Sha256: 9a94787f7f3445bb38ef612e7582ffecde37aa80db3934fe1846e23c85663126

Contents?: true

Size: 439 Bytes

Versions: 10

Compression:

Stored size: 439 Bytes

Contents

class Admin::<%= table_name.camelize %>Controller < Admin::BaseController
  authorize_resource param_method: :strong_params

  resource(<%= file_name.camelize %>,
           collection_scope: [:sorted],
           location: proc { params[:stay_in_place] ?
                           edit_polymorphic_path([:admin, resource]) :
                           polymorphic_path([:admin, resource.class]) },
           finder: :find_by_slug!)
end

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
adminos-1.0.0.pre.rc.5 lib/generators/templates/adminos/types/sortable/controller.rb.erb
adminos-1.0.0.pre.rc.5 lib/generators/templates/adminos/types/section/controller.rb.erb
adminos-1.0.0.pre.rc.4 lib/generators/templates/adminos/types/section/controller.rb.erb
adminos-1.0.0.pre.rc.4 lib/generators/templates/adminos/types/sortable/controller.rb.erb
adminos-1.0.0.pre.rc.3 lib/generators/templates/adminos/types/sortable/controller.rb.erb
adminos-1.0.0.pre.rc.3 lib/generators/templates/adminos/types/section/controller.rb.erb
adminos-1.0.0.pre.rc.2 lib/generators/templates/adminos/types/sortable/controller.rb.erb
adminos-1.0.0.pre.rc.2 lib/generators/templates/adminos/types/section/controller.rb.erb
adminos-1.0.0.pre.rc.1 lib/generators/templates/adminos/types/section/controller.rb.erb
adminos-1.0.0.pre.rc.1 lib/generators/templates/adminos/types/sortable/controller.rb.erb