Sha256: 657fd9707c5b1bc229d130b7c9dcf5703c38313fe4b85685b7577f051c8ec99f
Contents?: true
Size: 881 Bytes
Versions: 9
Compression:
Stored size: 881 Bytes
Contents
require 'rails/generators/rails/scaffold_controller/scaffold_controller_generator' require 'generators/osc_machete_rails/job_helpers' class OscMacheteRails::ScaffoldControllerGenerator < Rails::Generators::ScaffoldControllerGenerator include OscMacheteRails::JobHelpers source_root File.expand_path('../templates', __FILE__) # attribute to know what the job model is - see comments on active_record/workflow_model_generator.rb attr_reader :job def initialize(args, *options) @job = parse_job!(args) super end # override ScaffoldControllerGenerator # by recalling hook_for, the erb_generator will be searched for under OscMacheteRails # (idiosyncracy of Thor) # # the default template engine is erb, so we provide specific erb_generator.rb and its templates # see lib/generators/osc_machete_rails/erb for details hook_for :template_engine end
Version data entries
9 entries across 9 versions & 1 rubygems