Sha256: 13c995b676afc945a3a85d43b024eaa39393091a0967150d7b57b58aa4cdc1f5
Contents?: true
Size: 384 Bytes
Versions: 1
Compression:
Stored size: 384 Bytes
Contents
class CMS::<%= @name.to_s.pluralize %>Controller < CMS::BaseController helper_method :subject protected def subject CMS::<%= @name %> end def <%= @name.singular %>_params params.require(:<%= @name.singular %>).permit(<%= @type.accessible_attributes.map {|a| ":#{a.field_name}" }.sort.join(', ') %>) end alias :subject_params :<%= @name.singular %>_params end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
honey-cms-0.5.1 | lib/generators/cms/templates/type_controller.rb |