Sha256: ac3251f6eb7a012704b168ec2d1835278bf5d3b3bce4317d26f5541d9131788a

Contents?: true

Size: 348 Bytes

Versions: 6

Compression:

Stored size: 348 Bytes

Contents

class Create<%= group_user_name.camelize %> < ActiveRecord::Migration
  def self.up
    create_table :<%= group_user_name %>, :id => false, :force => true do |t|
      <% [group_name, user_name].sort.each do |name| -%>
      t.integer :<%= name %>_id
      <% end -%>
    end
  end

  def self.down
    drop_table :<%= group_user_name %>
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ixtlan-guard-0.7.0 lib/generators/active_record/templates/group_user_migration.rb
ixtlan-guard-0.6.1 lib/generators/active_record/templates/group_user_migration.rb
ixtlan-guard-0.6.0 lib/generators/active_record/templates/group_user_migration.rb
ixtlan-guard-0.5.0 lib/generators/active_record/templates/group_user_migration.rb
ixtlan-guard-0.4.1 lib/generators/active_record/templates/group_user_migration.rb
ixtlan-guard-0.4.0 lib/generators/active_record/templates/group_user_migration.rb