Re: [Rails] Re: Re: Re: Re: What the Ruby Association
On 13 July 2012 14:58, Jean-Sébastien D. <lists@ruby-forum.com> wrote:
> Here a final questions, not sure if you may know. I installed
> activeadmin has a gem and it allow me to manage any customer, interest
> and a manager to control when this one is expired or so
>
> It has the following associations
>
> class Client < ActiveRecord::Base
> has_many :music_interest_managers
> has_many :music_interests, through => :music_interest_managers
> end
> class MusicInterest < ActiveRecord::Base
> has_many :music_interest_managers
> has_many :clients, through => :music_interest_managers
> end
> class MusicInterestManager < ActiveRecord::Base
> belongs_to :music_interests
How many music_interests does it belong to. The fact that you have
used the plural suggests it belongs to several, but that does not seem
likely.
> belongs_to :client
> end
>
> But when installing a resources for MusicInterestManager I get the
> following error!
>
> Showing
> /home/jean/.rvm/gems/ruby-1.9.3-p194/gems/activeadmin-0.4.4/app/views/active_admin/resource/index.html.arb
> where line #1 raised:
>
> uninitialized constant ActivitiesManager::Customers
ActivitiesManager and Customers? Where did they come from?
How are you getting on with the tutorials?
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home