[Rails] Re: Mind-boggling problem with update_attributes()

2008-12-28 Thread Matt
That fixed my problem! Thanks! On Dec 28, 1:15 am, "Shiv N Gautam" wrote: > In case you are modifying the Roles table (and then updating the new fields) > you might want to reset the column information. > > ModelName.reset_column_information > > ModelName is your case might be Role. > > -- > Shi

[Rails] Re: Mind-boggling problem with update_attributes()

2008-12-27 Thread Shiv N Gautam
In case you are modifying the Roles table (and then updating the new fields) you might want to reset the column information. ModelName.reset_column_information ModelName is your case might be Role. -- Shiv On Sun, Dec 28, 2008 at 10:53 AM, Matt wrote: > > The Roles table is being changed in t

[Rails] Re: Mind-boggling problem with update_attributes()

2008-12-27 Thread Matt
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 => 'Develope

[Rails] Re: Mind-boggling problem with update_attributes()

2008-12-27 Thread Frederick Cheung
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