Sha256: 4e9374c8c80a454cc13461ee9338d5a9bddb23cf8f62332b38ef82768422b28a
Contents?: true
Size: 725 Bytes
Versions: 18
Compression:
Stored size: 725 Bytes
Contents
module Effective class SubscripterController < ApplicationController layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:subscriptions] : EffectiveOrders.layout) include Effective::CrudController submit :save, 'Save', redirect: :back, success: -> { 'Successfully updated plan.' } def resource @subscripter ||= Effective::Subscripter.new(user: current_user) end # I don't want save_resource to wrap my save in a transaction def save_resource(resource, action, to_assign) resource.assign_attributes(to_assign) resource.save! end # StrongParameters def subscripter_params params.require(:effective_subscripter).permit! end end end
Version data entries
18 entries across 18 versions & 1 rubygems