lib/dao/rails/lib/generators/dao/dao_generator.rb in dao-5.0.0 vs lib/dao/rails/lib/generators/dao/dao_generator.rb in dao-5.1.1
- old
+ new
@@ -10,10 +10,13 @@
generate_conducer!
when /system/
generate_system!
+ when /helper/
+ generate_helper!
+
when /api/
generate_system!
when /assets/
generate_system!
@@ -26,9 +29,13 @@
protected
def generate_conducer!
@conducer_name = ARGV.shift.sub(/_?conducer$/i, '') + '_conducer'
template "conducer.rb", "app/conducers/#{ @conducer_name.underscore }.rb"
+ end
+
+ def generate_helper!
+ copy_file("dao_helper.rb", "app/helpers/dao_helper.rb")
end
def generate_system!
FileUtils.mkdir_p(File.join(Rails.root, 'app/conducers'))