summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlessandro Desantis <desa.alessandro@gmail.com>2020-10-21 11:49:33 +0200
committerAlessandro Desantis <desa.alessandro@gmail.com>2020-10-21 11:49:33 +0200
commit9ac1fecfb8a4647ae8533279a99f8230b6731563 (patch)
tree109eaaafceed1feab09a34aab8cdb6f5add7d581 /app
parent204ac4bbaadac79bc4dfa1ac3c12b3be421d4622 (diff)
Fix `authorize!` calls using strings instead of symbols
CanCan requires `authorize!` calls to specify the name of the action as a symbol, if that's how it was specified in the ability.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb2
-rw-r--r--app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb b/app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb
index b7a2507..ff4f89f 100644
--- a/app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb
+++ b/app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb
@@ -34,7 +34,7 @@ module SolidusSubscriptions
def load_line_item
@line_item = SolidusSubscriptions::LineItem.find(params[:id])
- authorize! action_name, @line_item, subscription_guest_token
+ authorize! action_name.to_sym, @line_item, subscription_guest_token
end
def line_item_params
diff --git a/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb b/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb
index 4449a5d..4cd698e 100644
--- a/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb
+++ b/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb
@@ -40,7 +40,7 @@ module SolidusSubscriptions
def load_subscription
@subscription = SolidusSubscriptions::Subscription.find(params[:id])
- authorize! action_name, @subscription, subscription_guest_token
+ authorize! action_name.to_sym, @subscription, subscription_guest_token
end
def subscription_params