Groups
Groups
Sign in
Groups
Groups
declarative_authorization
Conversations
About
Send feedback
Help
Nested controller, with nested model
5 views
Skip to first unread message
Kris
unread,
Feb 20, 2012, 12:27:52 PM
2/20/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to declarative_authorization
Given the following
class Studies::Reports < ApplicationController
filter_resource_access :nested_in => :studies
class Study < AR::Base
has_many :reports
class Study::Report < AR::Base
belongs_to :study
NameError (uninitialized constant Report):
in_controller.rb:138:in `load_controller_object'
in_controller.rb:495:in `send'
in_controller.rb:495:in `filter_resource_access'
Is there any way to have delc_auth use Study::Report instead of
Report?
The only way I have found so far is a hack such as:
class Report < Study::Report; end
Rails 2.3.5
decl_auth 0.4.1
Many thanks, K.
Reply all
Reply to author
Forward
0 new messages