I'd recommend trying out the restful ACL plugin. 
http://www.railslodge.com/plugins/966-restful-acl

This is an effective way to set permissions for your project and is good 
to use in general. In this case, you could simply put in your Post 
model:

  def is_readable_by(user, parent = nil)
    self.user.eql?(user)
  end

This example is assuming you have belongs_to :user in your Post model. 
It takes a little while to learn but once you do it should be easy. I 
put this in all my models.
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to