Module: Application::Json::Libs
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/application/json/libs.rb
Overview
TODO: Deprecate
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #json_ui_app_build_version ⇒ Object
- #json_ui_app_bundle_id ⇒ Object
- #json_ui_app_device_os ⇒ Object
- #json_ui_app_is_android? ⇒ Boolean
- #json_ui_app_is_ios? ⇒ Boolean
- #json_ui_app_is_web? ⇒ Boolean
Instance Method Details
#json_ui_app_build_version ⇒ Object
16 17 18 19 20 |
# File 'app/controllers/concerns/application/json/libs.rb', line 16 def json_ui_app_build_version @json_ui_app_build_version ||= request.headers['JsonUiApp-Build-Version'] @json_ui_app_build_version = params[:build_version] if @json_ui_app_build_version.nil? && Rails.env.development? # For easy testing @json_ui_app_build_version end |
#json_ui_app_bundle_id ⇒ Object
12 13 14 |
# File 'app/controllers/concerns/application/json/libs.rb', line 12 def json_ui_app_bundle_id @json_ui_app_bundle_id ||= request.headers['JsonUiApp-Bundle-Id'] end |
#json_ui_app_device_os ⇒ Object
22 23 24 25 26 |
# File 'app/controllers/concerns/application/json/libs.rb', line 22 def json_ui_app_device_os @json_ui_app_device_os ||= request.headers['JsonUiApp-Device-Os'] @json_ui_app_device_os = params[:device_os] if @json_ui_app_device_os.nil? && Rails.env.development? # For easy testing @json_ui_app_device_os || 'web' end |
#json_ui_app_is_android? ⇒ Boolean
28 29 30 |
# File 'app/controllers/concerns/application/json/libs.rb', line 28 def json_ui_app_is_android? json_ui_app_device_os == 'android' end |
#json_ui_app_is_ios? ⇒ Boolean
32 33 34 |
# File 'app/controllers/concerns/application/json/libs.rb', line 32 def json_ui_app_is_ios? json_ui_app_device_os == 'ios' end |
#json_ui_app_is_web? ⇒ Boolean
36 37 38 |
# File 'app/controllers/concerns/application/json/libs.rb', line 36 def json_ui_app_is_web? json_ui_app_device_os == 'web' end |