Sha256: d944416226d0e1cf31e89772c9cc67fead721aaceec4ba0db5e67cc4e260ed48
Contents?: true
Size: 574 Bytes
Versions: 1
Compression:
Stored size: 574 Bytes
Contents
<% if the_module_name %> module <%=the_module_name%> <% end %>class <%= the_controller_name %> < ApplicationController include MegaBarConcern before_action ->{ myinit <%= model_id %> }, only: [:index, :show, :edit, :new] private def _params permits = [] controller_name.classify.constantize.attribute_names.each do |att| permits << att unless ['id', 'created_at', 'updated_at'].include?(att) end params.require(controller_name.singularize).permit(permits) end <% if the_module_name %> end<% end %> end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mega_bar-0.0.1 | lib/generators/mega_bar/mega_bar/templates/generic_controller.rb |