Sha256: eb3dc8f63cbea59a609e9bc1d1abc9eb5d691b6c11850b416f660784c8f8f9c8
Contents?: true
Size: 1.04 KB
Versions: 9
Compression:
Stored size: 1.04 KB
Contents
Trestle.resource(:<%= plural_name %><% if module? %>, scope: <%= module_name %><% end %>) do menu do item :<%= plural_name %>, icon: "fa fa-star" end # Customize the table columns shown on the index view. # # table do # column :name # column :created_at, align: :center # actions # end # Customize the form fields shown on the new/edit views. # # form do |<%= singular_table_name %>| # text_field :name # # row do # col(xs: 6) { datetime_field :updated_at } # col(xs: 6) { datetime_field :created_at } # end # end # By default, all parameters passed to the update and create actions will be # permitted. If you do not have full trust in your users, you should explicitly # define the list of permitted parameters. # # For further information, see the Rails documentation on Strong Parameters: # http://guides.rubyonrails.org/action_controller_overview.html#strong-parameters # # params do |params| # params.require(:<%= singular_table_name %>).permit(:name, ...) # end end
Version data entries
9 entries across 9 versions & 1 rubygems