Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

a_a_n

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a_a_n


Version published
Maintainers
1
Created
Source

Structure:

class UserProfile < ActiveRecord::Base

  belongs_to :home_country, :class_name => 'Country'
  belongs_to :current_university, :class_name => 'University'

  acts_as_aan do
    association :current_university do
      [:name]
    end
    association :home_country do
      [:name, { :iso_3166_a2 => :country_code}]
    end
  end

  validates :home_country, :presence => true
  validates :current_university, :presence => true
end

Usage:

u = UserProfile.new
u.home_country_name = 'Netherlands'
u.current_university_name = 'University Of Amsterdam'
u.save # => true

u.home_country # => #<Country id: 12, name: "Netherlands"
u.home_country_name # => "Netherlands"

FAQs

Package last updated on 27 Oct 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc