Module: NativeHelper
- Defined in:
- app/helpers/native_helper.rb
Instance Method Summary collapse
Instance Method Details
#current_app ⇒ Object
3 4 5 |
# File 'app/helpers/native_helper.rb', line 3 def current_app Native::App.find([:nativeAppId]) if [:nativeAppId] end |
#current_platform ⇒ Object
7 8 9 |
# File 'app/helpers/native_helper.rb', line 7 def current_platform current_app&.platform || 'web' end |
#native_assets ⇒ Object
11 12 13 14 15 |
# File 'app/helpers/native_helper.rb', line 11 def native_assets stylesheet = stylesheet_link_tag "native/#{current_platform}", media: 'all', 'data-turbolinks-track': 'reload' javascript = javascript_include_tag "native/#{current_platform}", 'data-turbolinks-track': 'reload' stylesheet.concat javascript end |
#set_app_owner ⇒ Object
17 18 19 |
# File 'app/helpers/native_helper.rb', line 17 def set_app_owner current_user if current_user end |