Class: Workarea::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
I18n::DefaultUrlOptions
Defined in:
app/controllers/workarea/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#current_locationObject



22
23
24
# File 'app/controllers/workarea/application_controller.rb', line 22

def current_location
  @current_location ||= Geolocation.new(request.env, request.remote_ip)
end

#default_url_optionsObject



18
19
20
# File 'app/controllers/workarea/application_controller.rb', line 18

def default_url_options(*)
  super.merge(host: Workarea.config.host)
end

#view_model_optionsObject



26
27
28
# File 'app/controllers/workarea/application_controller.rb', line 26

def view_model_options
  params.to_unsafe_h
end