Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- has_permission_on :post, :to => :manage do
- if_attribute :creator_id => is{user.id}
- end
- class Post < ActiveRecord::Base
- def publish!
- update_attributes(:published, true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement