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

Version Path
datagrid-0.7.1 lib/tasks/datagrid_tasks.rake
datagrid-0.7.0 lib/tasks/datagrid_tasks.rake
datagrid-0.6.4 lib/tasks/datagrid_tasks.rake
datagrid-0.6.3 lib/tasks/datagrid_tasks.rake
datagrid-0.6.2 lib/tasks/datagrid_tasks.rake
datagrid-0.6.0 lib/tasks/datagrid_tasks.rake
datagrid-0.5.4 lib/tasks/datagrid_tasks.rake
datagrid-0.5.3 lib/tasks/datagrid_tasks.rake
datagrid-0.5.2 lib/tasks/datagrid_tasks.rake
datagrid-0.5.1 lib/tasks/datagrid_tasks.rake
datagrid-0.5.0 lib/tasks/datagrid_tasks.rake