Sha256: 84e96c9348ccaf8c3c2f94847fbd566ffe4a926ea64cca928681bed6141081a1

Contents?: true

Size: 599 Bytes

Versions: 44

Compression:

Stored size: 599 Bytes

Contents

module DiscoApp::Admin::Concerns::SubscriptionsController
  extend ActiveSupport::Concern

  included do
    before_action :find_subscription
  end

  def edit
  end

  def update
    if @subscription.update_attributes(subscription_params)
      redirect_to edit_admin_shop_subscription_path(@subscription.shop, @subscription)
    else
      render 'edit'
    end
  end

  private

    def find_subscription
      @subscription = DiscoApp::Subscription.find_by_id(params[:id])
    end

    def subscription_params
      params.require(:subscription).permit(:amount, :trial_period_days)
    end

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.2 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.3 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.4 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.5 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.6 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.7 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.8 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.9 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.10 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.9.11 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.10.0 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.10.1 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.10.2 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.10.3 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.10.4 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.10.5 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.11.0 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.11.1 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb
disco_app-0.12.0 app/controllers/disco_app/admin/concerns/subscriptions_controller.rb