Sha256: add1af22b9a3292592299918ce90a37e5d50af526897a8ce8090fcf47d10e0c0
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
Coprl::Presenters.define(:index, namespace: :<%= plural_table_name %>) do helpers <%= controller_class_name %>Helper snackbar params[:notice] if params[:notice] grid do column 1 column 5 do heading '<%= human_name %>' list do <%= plural_table_name %>.each do |<%= singular_table_name %>| line <%= attributes.first ? "#{singular_table_name}.#{attributes.first.name}" : "\"#{human_name}\"" %> do actions do icon :edit do event :click do loads :edit, <%= singular_table_name %>_id: <%= singular_table_name %>.id end end icon :delete do event :click do dialog "are_you_sure#{<%= singular_table_name %>.id}" end end end event :click do loads :show, <%= singular_table_name %>_id: <%= singular_table_name %>.id end end end end link 'New <%= human_name %>', presenter_path(:new) end end confirm_delete_dialog end
Version data entries
3 entries across 3 versions & 1 rubygems