search for: home_address

Displaying 4 results from an estimated 4 matches for "home_address".

Did you mean: some_address
2006 Jan 26
1
Explanation on Activerecord Associations
A while back, I had some doubts on the use of associations. I still haven''t got a satisfactory guidance so that I can spring ahead with the project. I am trying to understand from a ruby point of view on doing things. Basically I have a controller that gives me a list of students. And each student may have say home address and mailing address. Hence I can model as shown below. How do I
2006 Feb 17
0
Model relationships in tests
I''m finding that its a pain to create yml files for tests where there are relationships between tables/classes. For example, I might have something like this: vehicle.yml red_ford: id:1 owner_id:2 owner.yml ford_owner: id:2 address_id:5 address.yml home_address: id:5 etc. To build up complex test relations, I have to edit all three files, keeping track of the ids / fkeys for each test case. I''ve thought about skipping foreign keys altogether in the fixtures and creating the relations programmatically in the test, or possibly writing a...
2009 Mar 05
7
issue with the object cache
...it would be cleaner to have the bulk of the data defined in the first migration). I wonder if this has anything to do with the issue. To be more specific, I changed this def self.up create_table :clients do |t| t.string :name, :null=>false t.text :office_address t.text :home_address t.timestamps end add_index(:clients, :name, :unique=>true) end into def self.up create_table :clients do |t| t.string :last_name, :null=>false t.string :first_name, :null=>false t.text :office_address t.text :home_address <bunch of...
2012 Oct 01
1
active_model_serializers, more than one level deep of associations, specifying serializers per association
I am assuming this an appropriate place to discuss this, but if it isn''t my apologies- just let me know. Just a Rails 4-ish thing. Am attempting to pull AMS (active_model_serializers), strong_parameters, and the "permitter" strategy that Adam Hawkins is using: http://broadcastingadam.com/2012/07/parameter_authorization_in_rails_apis/ Code so far is here (in the