Sha256: ed47c3dc75a44e43d21ee9e91e9bcedac5a0f788615b475a03b07dfa12723cae
Contents?: true
Size: 604 Bytes
Versions: 3
Compression:
Stored size: 604 Bytes
Contents
# frozen_string_literal: true module Datagrid module Generators class Views < Rails::Generators::Base source_root File.expand_path("../../../app/views/datagrid", __dir__) desc "Copies Datagrid partials to your application." def copy_views Dir.glob(File.join(self.class.source_root, "**", "*")).each do |file_path| relative_path = file_path.sub("#{self.class.source_root}/", "") next if relative_path == "_order_for.html.erb" copy_file(relative_path, File.join("app/views/datagrid", relative_path)) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
datagrid-2.0.1 | lib/datagrid/generators/views.rb |
datagrid-2.0.0 | lib/datagrid/generators/views.rb |
datagrid-2.0.0.pre.alpha | lib/datagrid/generators/views.rb |