active_generator 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a37b315867fe64abbcee1f2bf89039cda3aa199
4
- data.tar.gz: bbd082b834bb9c2c3ba487e4fda7fb7fbc9aa0fb
3
+ metadata.gz: 77da6787e317b3031644a9a2ef7750c942269249
4
+ data.tar.gz: 07cf65c3b30cd8a231d568454c7e6126d199bff4
5
5
  SHA512:
6
- metadata.gz: a4a5cfeb5582afc46aa872b5f95b86a846c7943b6c9436b6097c4537dee77ea6fcb7f0f9de6f9cbf641afc32d77742b0e70b4e6c41bd1421911e11eb88ae06f9
7
- data.tar.gz: 89ef2de39efb7e92c5aeea6ad07a026ba0062dfe198b8503030d53629db329475bc6180b37c6f8a94d59ed95d17a439aed51327245152dba778a7d9f32f9e7b2
6
+ metadata.gz: 8f803e9bd1d2a9d8cd526abd90c28d5cfa29b1e940a3508f0788d939a520a05fc7c6c19a7155a720f13aec6c03243881dee0ec037c3fe593e47991d305967594
7
+ data.tar.gz: b5f62c66e32bdc35e892f02a6006ff4ab58692a65d3a3fa483bb5820f3b6aae304cbbe92aa6c001ce7baff2672937a279b71543d730f97b35c8541365de88d74
@@ -1,3 +1,3 @@
1
1
  module ActiveGenerator
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
@@ -4,6 +4,12 @@ module ActiveRecord
4
4
  module Generators
5
5
  class ModelGenerator
6
6
 
7
+ def create_migration_file
8
+ return unless options[:migration] && options[:parent].nil?
9
+ attributes.each { |a| a.attr_options.delete(:index) if a.reference? && !a.has_index? } if options[:indexes] == false
10
+ migration_template "../../migration/templates/create_table_migration.rb", "db/migrate/create_#{table_name}.rb"
11
+ end
12
+
7
13
  def generate_locale_file
8
14
  invoke("locale:model", [name]) if ActiveGenerator.configuration.autoload_model_generator_locale
9
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez