Jeroen van Doorn
2006-Jul-17 12:52 UTC
[Rails] :create paramaters don''t get through (scoped_acces plugin)
Hi all, I''m wrestling with the scoped acces plugin to generate object access controll, but the :create params don''t seem to get through. :find works great. This is the code around_filter ScopedAccess::Filter.new(Service, :service_filter) layout "settings" protected def service_filter { :find => {:conditions => ["business_id = ?", current_user.get_business_id]}, :create => {:business_id => current_user.get_business_id}, } end Can someone push me in the right direction? Kind regards, Jeroen van Doorn
Jeroen van Doorn
2006-Jul-17 14:11 UTC
[Rails] :create paramaters don''t get through (scoped_acces plugin)
Okey, this was really dumb! I used Service.new instead of Service.create .... Regards, Jeroen Jeroen van Doorn schreef:> Hi all, > > I''m wrestling with the scoped acces plugin to generate object access > controll, but the :create params don''t seem to get through. :find > works great. This is the code > > around_filter ScopedAccess::Filter.new(Service, :service_filter) > layout "settings" > > protected > def service_filter > { > :find => {:conditions => ["business_id = ?", > current_user.get_business_id]}, > :create => {:business_id => current_user.get_business_id}, > } > end > Can someone push me in the right direction? > Kind regards, > Jeroen van Doorn > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >