Sha256: 1b5c1c05b2cb539d98b95682f22053e97edb562f57c608fbf715bf13b4418b56

Contents?: true

Size: 402 Bytes

Versions: 1

Compression:

Stored size: 402 Bytes

Contents

class <%= options[:name].pluralize.camelize %>Controller < ApplicationController
  # before_action :<%= options[:name].singularize %>, only: []
  private

  def <%= options[:name].singularize %>
    @<%= options[:name].singularize %> = <%= options[:name].capitalize%>.find(params[:id])
  end

  def <%= options[:name].singularize %>_params
    params.require(:<%= options[:name] %>).permit()
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
myrails-1.0.1 lib/myrails/templates/rails/controller.rb