Sha256: 7ada8ba7aa6dd0e8b753f79b3efc38a37acca6bfa427011f087d6b22186cc0a3
Contents?: true
Size: 656 Bytes
Versions: 6
Compression:
Stored size: 656 Bytes
Contents
class <%= options[:name].pluralize.camelize %>Controller < <% if options[:name].include?("/")%><%= options[:name].split("/").first.camelize %>::<%= options[:name].split("/").first.camelize %><% else %>Application<% end %>Controller # before_action :<%= options[:name].split("/").last.singularize %>, only: [] private def <%= options[:name].split("/").last.singularize %> @<%= options[:name].split("/").last.singularize %> = <%= options[:name].camelize.singularize %>.find(params[:id]) end def <%= options[:name].split("/").last.singularize %>_params params.require(:<%= options[:name].split("/").last.singularize %>).permit() end end
Version data entries
6 entries across 6 versions & 1 rubygems