Sha256: 02eb85527efc235d4d526da677ea96506a64b79d89181ae7bb57030fb20f68e7

Contents?: true

Size: 890 Bytes

Versions: 9

Compression:

Stored size: 890 Bytes

Contents

module Faalis
  module Generators
    module Concerns

      # This **Concern** looks for `raw_path` and `path` in scaffold
      # json file which both of them are optional.
      # Using `raw_path` you can override the full path of generate file.
      # and with `path` you can override the directory name inside
      # `app/assets/javascripts`.
      module Angular

        private

        # return the relative path to place where scaffold shoud be created.
        def angularjs_app_path
          if !resource_data['raw_path'].blank?
            resource_data['raw_path']
          elsif !resource_data['path'].blank?
            "app/assets/javascripts/#{resource_data['path']}/"
          else
            path = Faalis::Engine.dashboard_js_manifest.split('/')[0..-2].join('/')
            "app/assets/javascripts/#{path}/"
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
faalis-2.0.0.rc6 lib/faalis/generators/concerns/angular.rb
faalis-2.0.0.rc5 lib/faalis/generators/concerns/angular.rb
faalis-2.0.0.rc4 lib/faalis/generators/concerns/angular.rb
faalis-2.0.0.rc3 lib/faalis/generators/concerns/angular.rb
faalis-2.0.0.rc2 lib/faalis/generators/concerns/angular.rb
faalis-1.0.0 lib/faalis/generators/concerns/angular.rb
faalis-1.0.0.alpha4 lib/faalis/generators/concerns/angular.rb
faalis-1.0.0.alpha3 lib/faalis/generators/concerns/angular.rb
faalis-1.0.0.alpha2 lib/faalis/generators/concerns/angular.rb