Use ruby 2.x hash syntax
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class API::ApplicationController < ApplicationController
|
||||
skip_before_filter :verify_authenticity_token
|
||||
skip_before_filter :authenticate!, :only => [:cor_preflight]
|
||||
skip_before_filter :authenticate!, only: [:cor_preflight]
|
||||
|
||||
before_filter :cor_filter
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
class API::SessionsController < API::ApplicationController
|
||||
skip_before_filter :authenticate!, :only => [:create]
|
||||
skip_before_filter :authenticate!, only: [:create]
|
||||
|
||||
def create
|
||||
user = User.find_by_email(params[:session][:email])
|
||||
|
||||
if ! user.try(:authenticate?, params[:session][:password])
|
||||
return render :json => '', :status => :not_found
|
||||
return render json: '', status: :not_found
|
||||
end
|
||||
|
||||
@user = user
|
||||
|
@@ -2,6 +2,6 @@ class API::SoundsController < API::ApplicationController
|
||||
# FIXME: add some tests!
|
||||
def show
|
||||
sound = Sound.find params[:id]
|
||||
send_file sound.path, :type => sound.mime_type
|
||||
send_file sound.path, type: sound.mime_type
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user