Upgrade to Rails 5.0.0.1
This commit is contained in:
parent
ff2cbc0753
commit
10ba09f546
47 changed files with 398 additions and 291 deletions
|
@ -4,7 +4,7 @@ class Api::SalmonController < ApiController
|
|||
|
||||
def update
|
||||
ProcessInteractionService.new.(request.body.read, @account)
|
||||
render nothing: true, status: 201
|
||||
head 201
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -4,9 +4,9 @@ class Api::SubscriptionsController < ApiController
|
|||
|
||||
def show
|
||||
if @account.subscription(api_subscription_url(@account.id)).valid?(params['hub.topic'], params['hub.verify_token'])
|
||||
render text: HTMLEntities.new.encode(params['hub.challenge']), status: 200
|
||||
render plain: HTMLEntities.new.encode(params['hub.challenge']), status: 200
|
||||
else
|
||||
render nothing: true, status: 404
|
||||
head 404
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -15,9 +15,9 @@ class Api::SubscriptionsController < ApiController
|
|||
|
||||
if @account.subscription(api_subscription_url(@account.id)).verify(body, request.headers['HTTP_X_HUB_SIGNATURE'])
|
||||
ProcessFeedService.new.(body, @account)
|
||||
render nothing: true, status: 201
|
||||
head 201
|
||||
else
|
||||
render nothing: true, status: 202
|
||||
head 202
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class ApiController < ApplicationController
|
||||
protect_from_forgery with: :null_session
|
||||
skip_before_filter :verify_authenticity_token
|
||||
skip_before_action :verify_authenticity_token
|
||||
|
||||
protected
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ class Auth::RegistrationsController < Devise::RegistrationsController
|
|||
end
|
||||
|
||||
def configure_sign_up_params
|
||||
devise_parameter_sanitizer.for(:sign_up) do |u|
|
||||
u.permit(:email, :password, :password_confirmation, account_attributes: [:username])
|
||||
devise_parameter_sanitizer.permit(:sign_up) do |u|
|
||||
u.permit({ account_attributes: [:username] }, :email, :password, :password_confirmation)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
|
||||
before_filter :authenticate_user!
|
||||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
@applications = current_user.oauth_applications
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class XrdController < ApplicationController
|
||||
before_filter :set_format
|
||||
before_action :set_format
|
||||
|
||||
def host_meta
|
||||
@webfinger_template = "#{webfinger_url}?resource={uri}"
|
||||
|
@ -10,7 +10,7 @@ class XrdController < ApplicationController
|
|||
@canonical_account_uri = "acct:#{@account.username}@#{Rails.configuration.x.local_domain}"
|
||||
@magic_key = pem_to_magic_key(@account.keypair.public_key)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render nothing: true, status: 404
|
||||
head 404
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue