Sha256: 076fe1cbbdfb754a75dd9b07dad08eb5973c65b4977d81c1f62ac85509ac64f2

Contents?: true

Size: 589 Bytes

Versions: 23

Compression:

Stored size: 589 Bytes

Contents

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

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

      desc 'Creates a new MyDashboard widget.'

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

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
my_dashboard-0.8.6 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.8.5 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.8.4 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.8.3 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.8.1 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.8.0 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.7.2 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.7.1 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.7.0 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.6.0 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.10 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.9 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.8 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.7 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.6 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.5 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.4 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.3 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.2 lib/generators/my_dashboard/widget_generator.rb
my_dashboard-0.5.1 lib/generators/my_dashboard/widget_generator.rb