The Roles table is being changed in this migration, but I alter the
table before I start working with the data. The two code blocks are
adjacent. The @developerRole code is immediately above it, and
@developerRole is created by
@developerRole = Role.find(:first, :conditions => {:name =>
'Developer'})
Which happens immediately after the table alterations.
On Dec 27, 8:24 pm, Frederick Cheung <[email protected]>
wrote:
> Matt wrote:
> > puts ' -> Remove developer permissions collection'
> > @developerRole.permissions.delete_all
> > puts ' -> Set developer parent and list_priority'
> > @developerRole.update_attributes(:parent_id =>
> > @officerRole.id, :list_priority => 5)
>
> > The migration handles that fine. However it throws an error on:
>
> > @serviceChair = Role.create :name => 'Service Chair'
> > @serviceChair.update_attributes(:parent_id =>
> > @brotherRole.id, :list_priority => 3)
> > @serviceChair.permissions << @op_login
> > @serviceChair.permissions << @op_service_fundraising
>
> What (if any) is in between those two sections ? Are you changing the
> roles table in this migration ? Where does �...@developerrole come from ?
>
> Fred
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---