Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaned up generators.

  • Loading branch information...
commit e9fe85a15d16e88feac93e00691b02d0ce271914 1 parent 5a8e84f
Daniel Davey jeriko authored
6 lib/generators/active_record/templates/migration_bitmask.rb
View
@@ -2,9 +2,9 @@ class AddBitmaskRolesTo<%= table_name.camelize %> < ActiveRecord::Migration
def change
change_table :<%= table_name %> do |t|
t.integer :<%= self.role_col %>, default: 0
- <% if options.add_index %>
- t.index :<%= self.role_col %>
- <% end %>
+ <% if options.add_index -%>
+ t.index :<%= self.role_col %>
+ <% end -%>
end
end
end
6 lib/generators/active_record/templates/migration_non_bitmask.rb
View
@@ -2,9 +2,9 @@ class AddEasyRolesTo<%= table_name.camelize %> < ActiveRecord::Migration
def change
change_table :<%= table_name %> do |t|
t.string :<%= self.role_col %>, default: '--- []'
- <% if options.add_index %>
- t.index :<%= self.role_col %>
- <% end %>
+ <% if options.add_index -%>
+ t.index :<%= self.role_col %>
+ <% end -%>
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.