Authentication uninitialized constant

Mam problem z Authentication. Szukałem na google ktoś miał podbny problem pomógł restart servera… mi nie pomógł.

authorization_rules:

role :user do has_permission_on :home, :to => [:index, :y_right] end
routes.rb:

map.home "home", :controller => "home", :action => "index" map.graph "graph/:id", :controller => "home", :action => "graph"
Wchodze na:
http://127.0.0.1:3000/home usuwam w authorization_rules: “:index” - dostaje brak praw itp… (jestem z rola “user”) - WSZYSTKO OK!

wchodze na http://127.0.0.1:3000/graph/1
dostaje:

NameError in HomeController#graph /vendor/rails/activesupport/lib/active_support/inflector.rb:351:in `constantize' /vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' /usr/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/lib/declarative_authorization/in_controller.rb:607:in `load_object' /usr/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/lib/declarative_authorization/in_controller.rb:584:in `permit!' /usr/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/lib/declarative_authorization/in_controller.rb:111:in `filter_access_filter' /vendor/rails/activerecord/lib/active_record/base.rb:1909:in `all?' /usr/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/lib/declarative_authorization/in_controller.rb:111:in `each' /usr/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/lib/declarative_authorization/in_controller.rb:111:in `all?' /usr/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/lib/declarative_authorization/in_controller.rb:111:in `filter_access_filter' /vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `send' /vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `evaluate_method'

Dobra poradziłem sobie :slight_smile:
W home miałem :

filter_resource_access

Zmieniłem na:

filter_access_to :all

i działa role ładnie smigaja…

Jak by ktos był na tyle uprzejmy i napisał … Dlaczego…