I need to add a column to an existing table (and model). So i created a migration but I end up with following error :
No matching rules found for update for #<Authorization::AnonymousUser:0xaf100b8 @role_symbols=[:guest]>
So I managed to put my migration block into a "without_access_control" method block from the declarative authorization gem :
class AddDateToProjMesure < ActiveRecord::Migration
def change
add_column :proj_mesures, :date_reference, :date
Authorization::Maintenance::without_access_control do
ProjMesure.all.each do |proj_mesure|
proj_mesure.update_attributes! :date_reference => Time.zone.today
end # ProjMesure.all.each
end # Authorization::Maintenance::without_access_control
end
end
I need to add a column to an existing table (and model). So i created a migration but I end up with following error :
So I managed to put my migration block into a "without_access_control" method block from the declarative authorization gem :
but I still got the following error :
How can I have access to this public method ?