Sha256: 24c559ef367ef17879431373971a5d9dc51dde7f10c4cd905b80935463b880ff

Contents?: true

Size: 858 Bytes

Versions: 2

Compression:

Stored size: 858 Bytes

Contents

module Fancygrid
  module Generators#:nodoc:
    
    class ViewsGenerator < Rails::Generators::Base#:nodoc:

      def copy_views
        %w(controls list_frame table_frame search sort).each do |name|
          plugin_path = File.join(File.dirname(__FILE__), "../../app/views/fancygrid/base/#{name}.html.haml")
          rails_path = Rails.root.join("app/views/fancygrid/base/#{name}.html.haml")
          copy_file(plugin_path, rails_path)
        end
      end

      def print_info
        puts "====================================================================="
        puts ""
        puts "  Views have been copied to #{Rails.root.join('app/views/fancygrid/base')} "
        puts "  You can modify them as you wish"
        puts ""
        puts "====================================================================="
      end
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fancygrid-1.1.0 lib/generators/views_generator.rb
fancygrid-1.0.0 lib/generators/views_generator.rb