mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Convert before_filter to before_action
`before_filter` has been removed in future versions of rails. Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
parent
dab358cad0
commit
60ae4f6f5f
13 changed files with 39 additions and 39 deletions
|
|
@ -12,13 +12,13 @@ class ApplicationController < ActionController::Base
|
|||
layout proc{ |controller| controller.mobile? ? "mobile" : "application" }
|
||||
# exempt_from_layout /\.js\.erb$/
|
||||
|
||||
before_filter :set_session_expiration
|
||||
before_filter :set_time_zone
|
||||
before_filter :set_zindex_counter
|
||||
before_filter :set_locale
|
||||
append_before_filter :set_group_view_by
|
||||
prepend_before_filter :login_required
|
||||
prepend_before_filter :enable_mobile_content_negotiation
|
||||
before_action :set_session_expiration
|
||||
before_action :set_time_zone
|
||||
before_action :set_zindex_counter
|
||||
before_action :set_locale
|
||||
append_before_action :set_group_view_by
|
||||
prepend_before_action :login_required
|
||||
prepend_before_action :enable_mobile_content_negotiation
|
||||
|
||||
def set_locale
|
||||
locale = params[:locale] # specifying a locale in the request takes precedence
|
||||
|
|
@ -119,7 +119,7 @@ class ApplicationController < ActionController::Base
|
|||
# versions. Unfortunately, I ran into a lot of trouble simply registering a
|
||||
# new mime type 'text/html' with format :m because :html already is linked to
|
||||
# that mime type and the new registration was forcing all html requests to be
|
||||
# rendered in the mobile view. The before_filter and after_filter hackery
|
||||
# rendered in the mobile view. The before_action and after_filter hackery
|
||||
# below accomplishs that implementation goal by using a 'fake' mime type
|
||||
# during the processing and then setting it to 'text/html' in an
|
||||
# 'after_filter' -LKM 2007-04-01
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue