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.7.6 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.7.5 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.7.4 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.7.3 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.7.2 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.7.1 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.7.0 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.31 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.30 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.29 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.28 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.27 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.26 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.25 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.24 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.23 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.22 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.21 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.20 lib/generators/mobile_workflow/model_generator.rb
mobile_workflow-0.6.19 lib/generators/mobile_workflow/model_generator.rb