rails_generators/hobo_model/templates/model.rb in hobo-0.8.3 vs rails_generators/hobo_model/templates/model.rb in hobo-0.8.4
- old
+ new
@@ -8,24 +8,24 @@
<% end -%>
timestamps
end
- # --- Hobo Permissions --- #
+ # --- Permissions --- #
- def creatable_by?(user)
- user.administrator?
+ def create_permitted?
+ acting_user.administrator?
end
- def updatable_by?(user, new)
- user.administrator?
+ def update_permitted?
+ acting_user.administrator?
end
- def deletable_by?(user)
- user.administrator?
+ def destroy_permitted?
+ acting_user.administrator?
end
- def viewable_by?(user, field)
+ def view_permitted?(field)
true
end
end