Sha256: 7c3877fc5f27c23f42d1abf017608c090b13bc3b670591a4cadd740e93cd123d
Contents?: true
Size: 542 Bytes
Versions: 2
Compression:
Stored size: 542 Bytes
Contents
module Jobshop module Generators class JobshopGenerator < Rails::Generators::NamedBase namespace "jobshop" desc <<-DESC.strip_heredoc Generates a model with the given NAME, a migration (if one does not exist) and adds Jobshop to config/routes.rb DESC hook_for :orm def add_jobshop_route jobshop_route = "# jobshop_to :#{plural_name}" jobshop_route << %Q(, class_name: "#{class_name}") if class_name.include?("::") route jobshop_route end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jobshop-0.0.1 | lib/generators/jobshop_generator.rb |
jobshop-0.0.0 | lib/generators/jobshop_generator.rb |