module SmoothChange::ActionController::Helper

Add helper methods to use SmoothChange in your Rails’s ActionControllers

Public Instance Methods

smooth_change() click to toggle source
# File lib/smooth_change/action_controller/helper.rb, line 15
def smooth_change
  @smooth_change ||= SmoothChange::ClientFeatureToggler.from_http_header(http_header_value)
end
store_smooth_change() click to toggle source
# File lib/smooth_change/action_controller/helper.rb, line 11
def store_smooth_change
  SmoothChange::Current.smooth_change = smooth_change
end

Private Instance Methods

http_header_value() click to toggle source
# File lib/smooth_change/action_controller/helper.rb, line 21
def http_header_value
  request.headers.fetch(SmoothChange.configuration.http_header_name, "")
end