[Rails] Building Assocation with multiple belong_tos

2012-12-12 Thread Jarod Watkins
Hello, I have two models that look like the following: ModelA: attr_accessible :date, ... has_many :modelb accepts_nested_attributes_for :modelb end ModelB: attr_accessible :date, ... belongs_to :modela, :modelc, :modeld end And then in ModelAs controller: @modela = Modela.new

Re: [Rails] Building Assocation with multiple belong_tos

2012-12-12 Thread Jarod Watkins
Ah thanks Colin, that was it! On Wed, Dec 12, 2012 at 10:28 AM, Colin Law clan...@googlemail.com wrote: On 12 December 2012 15:18, Jarod Watkins jwatk...@jarodw.com wrote: Hello, I have two models that look like the following: ModelA: attr_accessible :date, ... has_many :modelb

[Rails] Same controller, two contexts return different request headers

2012-04-16 Thread Jarod Watkins
Hello, I have one controller that has two routes. One is a direct route and the other is a nested resource under another object. The two URLs are: http://example.com/controller http://example.com/nested/controller I have an AJAX form that submits data to a method via the GET method and then