1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib
eileencodes 456c3f1056 Ensure active record can load without Railties
When I added the rake tasks for multiple databases I accidentally made
it so you couldn't use Active Record without Railties.

Since getting the database configuration depends on being able to load
Railties (there is no other way to read and parse the yaml file and load
it) I've decided that using multiple databases outside of Rails is a
no-op.

I've changed the code here to return if Rails isn't defined. Then I
changed the other tasks to use `ActiveRecord::Tasks::DatabaseTasks.env`
instead of `Rails.env`. The multi-db tasks can keep using `Rails.env`
because they'll only be generated if we're using Rails and not just
Active Record.
2019-04-18 14:06:37 -04:00
..
active_record Ensure active record can load without Railties 2019-04-18 14:06:37 -04:00
arel Address ORA-01795: maximum number of expressions in a list is 1000 2019-04-11 12:54:53 +00:00
rails/generators Remove required: true from the model generator template 2019-04-15 20:27:55 +05:30
active_record.rb Refactor Relation#cache_key is moved from CollectionCacheKey#collection_cache_key 2019-04-04 13:18:59 +09:00
arel.rb Fix eager loading polymorphic association with mixed table conditions 2019-02-18 00:41:43 +09:00