Sha256: bb4fe6dd48f2cde25930c36f6b892454b4668b361d1b5becea8f70ee2bfc9435
Contents?: true
Size: 607 Bytes
Versions: 1
Compression:
Stored size: 607 Bytes
Contents
# frozen_string_literal: true require "rails/generators" module ActiveFields module Generators class ScaffoldGenerator < ::Rails::Generators::Base source_root File.expand_path("templates", __dir__) desc "This generator creates some useful templates" def copy_files Dir.glob("**/*", base: self.class.source_root).each do |path| next unless File.file?(File.expand_path(path, self.class.source_root)) copy_file path, File.join("app", path) end end def add_routes route "resources :active_fields" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_fields-1.1.0 | lib/generators/active_fields/scaffold/scaffold_generator.rb |