Sunday, November 15, 2009

ACL9 duh moment

Spent, oh, hours and hours getting ACL9 to work. Lots and lots of FAIL and gnashing of teeth.  Because I had neglected to include a key line in my controller.

# posts_controller.rb
def create
current_user.has_role!(:owner, @post)

Because, see, the current user can't edit or destroy an object unless it is made explicit that he owns it.

When things just work after a lot of tedious larking about I'm always left with a curious feeling: That's it! Why that was nothing!

On to the next self-inflicted challenge!

blog comments powered by Disqus