Sha256: eec0cded50fdd28f105b865c1b2095908b615ce2a9c4373f75d5cd11bc32c9db

Contents?: true

Size: 1.82 KB

Versions: 7

Compression:

Stored size: 1.82 KB

Contents

require "active_record"

ActiveRecord::Migration.create_table :adminpanel_users do |t|
    t.string   :name
    t.string   :email
    t.string   :password_digest
    t.string   :remember_token
    t.datetime :created_at,      :null => false
    t.datetime :updated_at,      :null => false
end
ActiveRecord::Migration.create_table :adminpanel_categories do |t|
    t.string   :name
    t.datetime :created_at,      :null => false
    t.datetime :updated_at,      :null => false
end
ActiveRecord::Migration.create_table :adminpanel_galleries do |t|
    t.string   :file
    t.datetime :created_at,      :null => false
    t.datetime :updated_at,      :null => false
end
ActiveRecord::Migration.create_table :adminpanel_images do |t|
    t.string   :file
    t.string   :foreign_key
    t.string   :model
    t.datetime :created_at,      :null => false
    t.datetime :updated_at,      :null => false
end
ActiveRecord::Migration.create_table :adminpanel_products do |t|
    t.string   :name
    t.text     :description
    t.datetime :created_at,      :null => false
    t.datetime :updated_at,      :null => false
    t.string   :category_id
    t.string   :brief
end
ActiveRecord::Migration.create_table :adminpanel_sections do |t|
    t.string   :name
    t.text     :description
    t.string   :key
    t.boolean  :has_image
    t.string   :file
    t.datetime :created_at,      :null => false
    t.datetime :updated_at,      :null => false
    t.boolean  :has_description
end
module ActiveModel::Validations
  def errors_on(attribute)
    self.valid?
    [self.errors[attribute]].flatten.compact
  end
  alias :error_on :errors_on
end
RSpec.configure do |config|
  config.around do |example|
    ActiveRecord::Base.transaction do
      example.run
      raise ActiveRecord::Rollback
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
adminpanel-0.1.0cl.2 spec/support/active_record.rb
adminpanel-0.1.0cl spec/support/active_record.rb
adminpanel-0.1.0 spec/support/active_record.rb
adminpanel-0.0.7 spec/support/active_record.rb
adminpanel-0.0.6.1 spec/support/active_record.rb
adminpanel-0.0.6 spec/support/active_record.rb
adminpanel-0.0.5 spec/support/active_record.rb