Ok, I see now that in plugin thinks @project is a Hash class. But when
I display @project.class in my controller I get Project
so what it changes in some magic way??
On Apr 17, 4:30 pm, abusiek
<abus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi!
>
> I''m using Rails 2.0.2 and i''ve install
"authorization plugin", Now
> when I write something like this:
>
> @project = Project.new(params[:project])
> if @project.save
> @manager = User.find(params[:project][:user_id])
> @manager.has_role "manager of :project", :project =>
@project
>
> i''m getting error:
>
> undefined method `base_class'' for Hash:Class
>
> vendor/plugins/authorization/lib/publishare/object_roles_table.rb:
> 62:in `get_role''
> vendor/plugins/authorization/lib/publishare/object_roles_table.rb:
> 32:in `has_role''
> app/controllers/projects_controller.rb:21:in `save''
> app/controllers/projects_controller.rb:16:in `save''
>
> Any ideas why?
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---