Merge pull request #478 from metamaps/feature/cleanup
remove unneeded https stuff & more
This commit is contained in:
commit
2e6493fd23
9 changed files with 11 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
|
||||
before_filter :get_invite_link
|
||||
before_action :get_invite_link
|
||||
after_action :allow_embedding
|
||||
|
||||
# this is for global login
|
||||
|
@ -12,13 +12,7 @@ class ApplicationController < ActionController::Base
|
|||
helper_method :admin?
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
unsafe_uri = request.env["REQUEST_URI"]
|
||||
if unsafe_uri.starts_with?('http') && !unsafe_uri.starts_with?('https')
|
||||
protocol = 'http'
|
||||
else
|
||||
protocol = 'https'
|
||||
end
|
||||
sign_in_url = url_for(:action => 'new', :controller => 'sessions', :only_path => false, :protocol => protocol)
|
||||
sign_in_url = url_for(:action => 'new', :controller => 'sessions', :only_path => false, :protocol => 'https')
|
||||
|
||||
if request.referer == sign_in_url
|
||||
super
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class MappingsController < ApplicationController
|
||||
|
||||
before_filter :require_user, only: [:create, :update, :destroy]
|
||||
before_action :require_user, only: [:create, :update, :destroy]
|
||||
|
||||
respond_to :json
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class MapsController < ApplicationController
|
||||
before_filter :require_user, only: [:create, :update, :screenshot, :destroy]
|
||||
before_action :require_user, only: [:create, :update, :screenshot, :destroy]
|
||||
|
||||
respond_to :html, :json
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class MetacodeSetsController < ApplicationController
|
||||
|
||||
before_filter :require_admin
|
||||
before_action :require_admin
|
||||
|
||||
# GET /metacode_sets
|
||||
# GET /metacode_sets.json
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class MetacodesController < ApplicationController
|
||||
before_filter :require_admin, except: [:index]
|
||||
before_action :require_admin, except: [:index]
|
||||
|
||||
# GET /metacodes
|
||||
# GET /metacodes.json
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class SynapsesController < ApplicationController
|
||||
include TopicsHelper
|
||||
|
||||
before_filter :require_user, only: [:create, :update, :destroy]
|
||||
before_action :require_user, only: [:create, :update, :destroy]
|
||||
|
||||
respond_to :json
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class TopicsController < ApplicationController
|
||||
include TopicsHelper
|
||||
|
||||
before_filter :require_user, only: [:create, :update, :destroy]
|
||||
before_action :require_user, only: [:create, :update, :destroy]
|
||||
|
||||
respond_to :html, :js, :json
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Users::RegistrationsController < Devise::RegistrationsController
|
||||
before_filter :configure_sign_up_params, only: [:create]
|
||||
before_filter :configure_account_update_params, only: [:update]
|
||||
before_action :configure_sign_up_params, only: [:create]
|
||||
before_action :configure_account_update_params, only: [:update]
|
||||
|
||||
protected
|
||||
def after_sign_up_path_for(resource)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class UsersController < ApplicationController
|
||||
before_filter :require_user, only: [:edit, :update, :updatemetacodes]
|
||||
before_action :require_user, only: [:edit, :update, :updatemetacodes]
|
||||
|
||||
respond_to :html, :json
|
||||
|
||||
|
|
Loading…
Reference in a new issue