Sha256: 65e38c41feb48771bf7b6bf106add572833498262b260fcfc77ac040250b2685

Contents?: true

Size: 574 Bytes

Versions: 1

Compression:

Stored size: 574 Bytes

Contents

module Dashing
  module Generators
    class WidgetGenerator < ::Rails::Generators::NamedBase

      source_root File.expand_path('../../templates', __FILE__)

      desc 'Creates a new Dashing widget.'

      def widget
        template 'widgets/new.html',    Dashing.config.widgets_views_path.call.join("#{file_name}.html")
        template 'widgets/new.scss',    Dashing.config.widgets_css_path.join('widgets', "#{file_name}.scss")
        template 'widgets/new.coffee',  Dashing.config.widgets_js_path.join('widgets', "#{file_name}.coffee")
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dashing-rails-2.3.2 lib/generators/dashing/widget_generator.rb