@@ -121,7 +121,7 @@ def get_schema_info(klass, header, options = {})
121
121
col_type = ( col . type || col . sql_type ) . to_s
122
122
if col_type == "decimal"
123
123
col_type << "(#{ col . precision } , #{ col . scale } )"
124
- elsif col_type != "spatial"
124
+ elsif col_type != "spatial"
125
125
if ( col . limit )
126
126
if col . limit . is_a? Array
127
127
attrs << "(#{ col . limit . join ( ', ' ) } )"
@@ -140,7 +140,7 @@ def get_schema_info(klass, header, options = {})
140
140
# and print the type and SRID
141
141
if col . respond_to? ( :geometry_type )
142
142
attrs << "#{ col . geometry_type } , #{ col . srid } "
143
- elsif col . respond_to? ( :geometric_type ) and col . geometric_type . present?
143
+ elsif col . respond_to? ( :geometric_type ) and col . geometric_type . present?
144
144
attrs << "#{ col . geometric_type . to_s . downcase } , #{ col . srid } "
145
145
end
146
146
@@ -238,7 +238,7 @@ def annotate_one_file(file_name, info_block, position, options={})
238
238
if new_content . end_with? ( info_block + "\n " )
239
239
new_content = old_content . sub ( PATTERN , "\n " + info_block )
240
240
end
241
-
241
+
242
242
# if there *was* no old schema info (no substitution happened) or :force was passed,
243
243
# we simply need to insert it in correct position
244
244
if new_content == old_content || options [ :force ]
@@ -377,9 +377,9 @@ def get_model_class(file)
377
377
378
378
# Retrieve loaded model class by path to the file where it's supposed to be defined.
379
379
def get_loaded_model ( model_path )
380
- begin
380
+ begin
381
381
ActiveSupport ::Inflector . constantize ( ActiveSupport ::Inflector . camelize ( model_path ) )
382
- rescue
382
+ rescue
383
383
# Revert to the old way but it is not really robust
384
384
ObjectSpace . each_object ( ::Class ) .
385
385
select do |c |
@@ -433,7 +433,6 @@ def annotate_model_file(annotated, file, header, options)
433
433
end
434
434
435
435
def remove_annotations ( options = { } )
436
-
437
436
self . model_dir = options [ :model_dir ] if options [ :model_dir ]
438
437
deannotated = [ ]
439
438
deannotated_klass = false
0 commit comments