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