Module: Rails

Extended by:
Rails
Included in:
Rails
Defined in:
lib/sinatra/activerecord/rake/activerecord_3.rb

Instance Method Summary collapse

Instance Method Details

#applicationObject



14
15
16
17
18
19
20
21
22
# File 'lib/sinatra/activerecord/rake/activerecord_3.rb', line 14

def application
  seed_loader = Object.new
  seed_loader.instance_eval do
    def load_seed
      load "db/seeds.rb"
    end
  end
  seed_loader
end

#envObject



10
11
12
# File 'lib/sinatra/activerecord/rake/activerecord_3.rb', line 10

def env
  ActiveSupport::StringInquirer.new(ENV["APP_ENV"] || ENV["RACK_ENV"] || "development")
end

#rootObject



6
7
8
# File 'lib/sinatra/activerecord/rake/activerecord_3.rb', line 6

def root
  Pathname.new(Rake.application.original_dir)
end