Sha256: 0f6cb8889d5da1e5c4fe22b2a3153e8382642918ffed13be74813006cecf68da

Contents?: true

Size: 500 Bytes

Versions: 15

Compression:

Stored size: 500 Bytes

Contents

# Stand-in for ActiveRecord, invoked by Jax::Generators::ModelGenerator when --rails is passed.
# This lets us mock up the AR model generator so that we don't have to worry about what happens when
# AR can't find a database. Ultimately, this keeps Jax loosely coupled to AR, so that other ORMs can
# be used.

module Test
  module Generators
    class ModelGenerator < ::Rails::Generators::NamedBase
      def create_model
        create_file "app/models/#{file_name}.rb"
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jax-3.0.0.rc2 spec/support/test_model_generator.rb
jax-2.0.12 spec/support/test_model_generator.rb
jax-3.0.0.rc1 spec/support/test_model_generator.rb
jax-2.0.11 spec/support/test_model_generator.rb
jax-2.0.10 spec/support/test_model_generator.rb
jax-2.0.9 spec/support/test_model_generator.rb
jax-2.0.8 spec/support/test_model_generator.rb
jax-2.0.7 spec/support/test_model_generator.rb
jax-2.0.6 spec/support/test_model_generator.rb
jax-2.0.5 spec/support/test_model_generator.rb
jax-2.0.4 spec/support/test_model_generator.rb
jax-2.0.3 spec/support/test_model_generator.rb
jax-2.0.2 spec/support/test_model_generator.rb
jax-2.0.1 spec/support/test_model_generator.rb
jax-2.0.0 spec/support/test_model_generator.rb