Sha256: 3059dbff2e9776175cdf2126579ab7e6cbc68818b358e6492d72ea0c1331e0db

Contents?: true

Size: 621 Bytes

Versions: 2

Compression:

Stored size: 621 Bytes

Contents

module Answers
  module <%= namespacing %>
    module Admin
      class <%= class_name.pluralize %>Controller < ::Answers::AdminController

        crudify :'answers/<%= namespacing.underscore %>/<%= singular_name %>'<% if (title = attributes.detect { |a| a.type.to_s =~ /string|text/ }).present? and title.name != 'title' -%>,
                :title_attribute => '<%= title.name %>'<% end -%><% if plural_name == singular_name -%>,
                :redirect_to_url => :answers_<%= namespacing.underscore %>_admin_<%= singular_name %>_index_path<% end %>,
                :xhr_paging => true

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
answers-core-0.0.0.2 lib/generators/answers/engine/templates/app/controllers/answers/namespace/admin/plural_name_controller.rb.erb
answers-core-0.0.0 lib/generators/answers/engine/templates/app/controllers/answers/namespace/admin/plural_name_controller.rb.erb