Sha256: 3a8fb5fc8748d2dbf888bfc74fa49af99047e71bebb752eadb283261b438f124

Contents?: true

Size: 584 Bytes

Versions: 2

Compression:

Stored size: 584 Bytes

Contents

module NativeHelper

    def current_app
        Native::App.find(cookies[:nativeAppId]) if cookies[:nativeAppId]
    end

    def current_platform
        current_app&.platform || 'web'
    end

    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

    def set_app_owner
        current_user if current_user
    end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
native-2.1.4 app/helpers/native_helper.rb
native-2.1.3 app/helpers/native_helper.rb