Sha256: 8b6e3efe23a723c45de70d764f775047af779cc3d414fa9f1e3a363846d0ddfc

Contents?: true

Size: 424 Bytes

Versions: 7

Compression:

Stored size: 424 Bytes

Contents

class <%= controller_class_name %>Controller < InheritedResources::Base
<% if options[:singleton] -%>
  defaults :singleton => true
<% end -%>
<% if Rails::VERSION::MAJOR >= 4 || defined?(ActiveModel::ForbiddenAttributesProtection) -%>

  private

    def <%= singular_name %>_params
      params.require(:<%= singular_name %>).permit(<%= attributes_names.map{ |a_name| ":#{a_name}" }.join(", ") %>)
    end
<% end -%>
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
inherited_resources-1.9.0 lib/generators/rails/templates/controller.rb
inherited_resources-1.8.0 lib/generators/rails/templates/controller.rb
inherited_resources-1.7.2 lib/generators/rails/templates/controller.rb
inherited_resources-1.7.1 lib/generators/rails/templates/controller.rb
inherited_resources-1.7.0 lib/generators/rails/templates/controller.rb
inherited_resources-1.6.0 lib/generators/rails/templates/controller.rb
inherited_resources-1.5.1 lib/generators/rails/templates/controller.rb