Hi everybody, I have to change a lot of data in production server and I don't know what's the best way to do it.
To handle the permissions in the older version of my system I had two models: Group and Permision. class Group < ActiveRecord::Base has_many :actions end class Permission < ActiveRecord::Base belongs_to :group PERMISSION_NAMES = "..." end I stored the application permissions inside the model. Now I did a lot of changes in this code and it looks something like this: class Group < ActiveRecord::Base has_many :actions end class Action < ActiveRecord::Base belongs_to :group belongs_to :permission end class Permission < ActiveRecord::Base has_many :actions end The Permission model holds a list of permissions and their Id. It is like a domain table. This way a group can have many permissions and a permission can have many groups. Now comes the problem. I need to deploy these changes in the production servers. I already have the script to update the changes, but I don't know what is the conventional place to put it. Not in the migrations, I know. I put them in the seeds file, but I think is even worse. Another important thing is that I would love to do some automated tests on my script. How can I do that. Many thanks in advance. Best regards, Marco Antonio -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.