Sha256: bf919fa268334a24f0701bdc407c8d3a4a53e2424b430f8d699b8f6a126cebae

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

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_galleries do |t|
    t.string   :file
    t.integer  :position
    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_sections do |t|
    t.string   :name
    t.text     :description
    t.string   :key
    t.boolean  :has_image
    t.string   :page
    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

1 entries across 1 versions & 1 rubygems

Version Path
adminpanel-1.0.0 spec/support/test_database.rb