Sha256: 79c1a7dcd1ae25205857fee5abf4e95f3ab589872efc5863e1198b98ef66d881
Contents?: true
Size: 593 Bytes
Versions: 12
Compression:
Stored size: 593 Bytes
Contents
class EmailsController < ApplicationController before_action :require_sudo before_action :set_<%= singular_table_name %> def update if @<%= singular_table_name %>.update(<%= "#{singular_table_name}_params" %>) render json: @<%= singular_table_name %> else render json: @<%= singular_table_name %>.errors, status: :unprocessable_entity end end private def set_<%= singular_table_name %> @<%= singular_table_name %> = Current.<%= singular_table_name %> end def <%= "#{singular_table_name}_params" %> params.permit(:email) end end
Version data entries
12 entries across 12 versions & 1 rubygems