Sha256: 2f723092ff658e8fc7a5979444f3655eab0ae4b41125289d7cb17501a896e710
Contents?: true
Size: 599 Bytes
Versions: 11
Compression:
Stored size: 599 Bytes
Contents
namespace :datagrid do desc "Copy table partials into rails application" task :copy_partials do require "fileutils" def copy_template(path) gem_app = File.expand_path("../../../app", __FILE__) rails_app = (Rails.root + "app").to_s full_path = "#{rails_app}/#{File.dirname path}" puts "* copy #{full_path}" FileUtils.mkdir_p full_path FileUtils.cp "#{gem_app}/#{path}", full_path end copy_template "views/datagrid/_table.html.erb" copy_template "views/datagrid/_head.html.erb" copy_template "views/datagrid/_row.html.erb" end end
Version data entries
11 entries across 11 versions & 1 rubygems