Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MLSDev/api_authentication
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7af5b0cc8d7efaf30fd8f64793d4fc5a61501c3e
Choose a base ref
..
head repository: MLSDev/api_authentication
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 10fee041056455b7225041b1b4ca683c14a80cef
Choose a head ref
3 changes: 2 additions & 1 deletion app/controllers/api_authentication/base_controller.rb
Original file line number Diff line number Diff line change
@@ -3,10 +3,11 @@
module ApiAuthentication
class BaseController < ApplicationController
include ApiAuthentication::RequestAuthorizeable
protect_from_forgery with: :exception, unless: -> { request.format.json? }

before_action :authenticate!

attr_reader :collection, :resource, :parent
helper_method :collection, :resource, :parent

rescue_from ActionController::ParameterMissing do |exception|
@exception = exception
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

@resource.to_json
resource.to_json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

@resource.to_json
resource.to_json
2 changes: 1 addition & 1 deletion app/views/api_authentication/push_tokens/create.json.ruby
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

ApiAuthentication::PushTokenDecorator.decorate(@resource).to_json
ApiAuthentication::PushTokenDecorator.decorate(resource).to_json
2 changes: 1 addition & 1 deletion app/views/api_authentication/push_tokens/update.json.ruby
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

ApiAuthentication::PushTokenDecorator.decorate(@resource).to_json
ApiAuthentication::PushTokenDecorator.decorate(resource).to_json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

ApiAuthentication::UserDecorator.decorate(@resource).to_json
ApiAuthentication::UserDecorator.decorate(resource).to_json
2 changes: 1 addition & 1 deletion app/views/api_authentication/sessions/create.json.ruby
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

@resource.to_json
resource.to_json