Found the way to do that by using 'inverse_of' option (see below):
On 25 Mar 2013, at 16:03, Javix wrote:
> I'm using accepts_nested_attributes as follows:
>
> class Timesheet < ActiveRecord::Base
> attr_accessible :status, :user_id, :start_date, :end_date,
> :activities_attributes
> has_m
I'm using accepts_nested_attributes as follows:
class Timesheet < ActiveRecord::Base
attr_accessible :status, :user_id, :start_date, :end_date,
:activities_attributes
has_many :activities, dependent: :destroy
has_many :time_entries, through: :activities
accepts_nested_attributes_for :acti
2 matches
Mail list logo