Robert Malko wrote:> Subject says it all. Is it possible to user the current_user variable
> from the acts as authenticated and restful authentication plugin in the
> scope call of an acts as list on the model?
the current_user method in the acts_as_authenticated plugin is not a db
field so the acts_as_list won''t work with this method (not "user
variable" as you mentioned). It will work however with the :user_id in
the model users and yes, you can scope the users any way you want..
In the container for your users, whether it''s a "group",
"club",
"party", etc.. do
class Party < ActiveRecord::Base
has_many :users, :order => position
end
class User < ActiveRecord::Base
belongs_to :party, :scope => party_id
end
hth
ilan
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---