Sha256: 75c93f7effd6d77031f340e96024645d1135834ebd5eef450c080b692ca66887

Contents?: true

Size: 569 Bytes

Versions: 4

Compression:

Stored size: 569 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
  Copies files for rendering sortable nested set
        BANNER
      end

      def copy_sortable_tree_files
        directory "the_sortable_tree", "app/views/#{folder}/the_sortable_tree"
      end
        
      private

      def folder
        name.pluralize.downcase
      end

    end#ViewsGenerator
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
the_sortable_tree-1.2.0 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.1.3 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.1.1 lib/generators/the_sortable_tree/views_generator.rb
the_sortable_tree-1.0.0 lib/generators/the_sortable_tree/views_generator.rb