Sha256: d3b2bfd14ee4eefc1e82b937718cbb2dd10b8932863284e74ed63af6a459f45e

Contents?: true

Size: 711 Bytes

Versions: 12

Compression:

Stored size: 711 Bytes

Contents

module TheSortableTree
  module Generators
    class ViewsGenerator < Rails::Generators::NamedBase
      source_root File.expand_path('../../../../app/views', __FILE__)

      def self.banner
        <<-BANNER.chomp
rails g the_sortable_tree:views MODEL [min]
  Copies files for rendering sortable nested set
        BANNER
      end

      def copy_sortable_tree_files
        if ARGV[1] == 'min'
          directory "the_sortable_tree_min", "app/views/#{folder}/the_sortable_tree_min"
        else
          directory "the_sortable_tree", "app/views/#{folder}/the_sortable_tree"
        end
      end

      private

      def folder
        name.pluralize.downcase
      end

    end#ViewsGenerator
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
the_sortable_tree_mongoid-1.8.5.1 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree_mongoid-1.8.5 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.8.6 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.8.5 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.8.0 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.7.1 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.7.0 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.6.0 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.5.0 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.4.8 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.4.7 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.4.6 lib/generators/the_sortable_tree/views_generator.rb