Sha256: 71f67c62794686a8410f4b1d96a74ac932f692ca7692dd60d99af60f08cd5e5f

Contents?: true

Size: 436 Bytes

Versions: 3

Compression:

Stored size: 436 Bytes

Contents

module Admin
  class <%= class_name.pluralize %>Controller < Admin::BaseController

    crudify :<%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? and title.name != 'title' %>,
            :title_attribute => '<%= title.name %>'<% end %><% if plural_name == singular_name %>,
              :redirect_to_url => :admin_<%= singular_name %>_index_path
<% end %>, :xhr_paging => true

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
refinerycms-generators-1.0.4 lib/generators/refinery_engine/templates/app/controllers/admin/plural_name_controller.rb
refinerycms-generators-1.0.3 lib/generators/refinery_engine/templates/app/controllers/admin/plural_name_controller.rb
refinerycms-generators-1.0.2 lib/generators/refinery_engine/templates/app/controllers/admin/plural_name_controller.rb