Sha256: bfcc4bc07e4463fda94a49b4b49e1eaeef10bdee7d31c51180ebeea29daf1062
Contents?: true
Size: 516 Bytes
Versions: 19
Compression:
Stored size: 516 Bytes
Contents
class <%= class_name %> < ActiveRecord::Base hobo_model # Don't put anything above this fields do <% for attribute in attributes -%> <%= "%-#{max_attribute_length}s" % attribute.name %> :<%= attribute.type %> <% end -%> timestamps end # --- Permissions --- # def create_permitted? acting_user.administrator? end def update_permitted? acting_user.administrator? end def destroy_permitted? acting_user.administrator? end def view_permitted?(field) true end end
Version data entries
19 entries across 19 versions & 1 rubygems