Sha256: b8e340be72d248f5debca42788b622cd5da05e8a127007af87b4042fdea67729

Contents?: true

Size: 1.03 KB

Versions: 13

Compression:

Stored size: 1.03 KB

Contents

require "active_record/fixtures"

module ActiveRecord
  # http://api.rubyonrails.org/classes/ActiveRecord/
  # ConnectionAdapters/AbstractAdapter.html
  module ConnectionAdapters
    # http://api.rubyonrails.org/classes/ActiveRecord/
    # ConnectionAdapters/PostgreSQLAdapter.html
    class PostgreSQLAdapter < AbstractAdapter
      # PostgreSQL only disables referential integrity when connection
      # user is root and that is not the case.
      def disable_referential_integrity
        yield
      end
    end
  end
end

namespace :seed do
  desc "seed the database with fixtures from spec/fixtures"
  task with_think_feel_do_dashboard_fixtures: :environment do
    puts "seeding with_think_feel_do_dashboard_fixtures..."
    path = File.join(File.dirname(__FILE__), "..", "..", "spec", "fixtures")
    ActiveRecord::FixtureSet.create_fixtures path, [
      :participants,
      :users,
      :user_roles,
      :arms,
      :groups,
      :coach_assignments,
      :memberships
    ]
    puts "seeded with_think_feel_do_dashboard_fixtures."
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
think_feel_do_dashboard-1.2.0.beta1 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.21 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.20 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.19 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.18 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.17 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.16 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.15 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.14 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.13 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.12 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.11 lib/tasks/seed.rake
think_feel_do_dashboard-1.1.10 lib/tasks/seed.rake