Sha256: d8b777a04277b57f5bcf0b5c2a22902d4662bfb2c30b5825cfc3a21338cf814d

Contents?: true

Size: 540 Bytes

Versions: 38

Compression:

Stored size: 540 Bytes

Contents

require 'rails/generators/active_record/model/model_generator'

module MobileWorkflow
  module Generators

    class ModelGenerator < ActiveRecord::Generators::ModelGenerator
      source_root File.join(File.dirname(ActiveRecord::Generators::ModelGenerator.instance_method(:create_migration_file).source_location.first), "templates")
      
      def create_model_file
        template File.join(File.dirname(__FILE__), "templates", "model.rb.erb"), File.join('app/models', class_path, "#{file_name}.rb")
      end
      
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
mobile_workflow-0.6.18 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.17 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.16 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.15 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.14 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.13 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.12 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.11 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.10 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.9 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.8 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.7 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.6 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.4 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.3 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.2 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.1 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.0 lib/generators/mobile_workflow/model_generator.rb