| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master: (32 commits)
Typo fix for unscope
Use the reference for the mime type to get the format
Preparing for 4.1.0.beta2 release
Correctly escape PostgreSQL arrays.
Escape format, negative_format and units options of number helpers
Sync 4.1 release notes with changes since 7f648bc7 [ci skip]
Update upgrading guide regarding `render :text`
Add `#no_content_type` attribute to `AD::Response`
Add missing CHANGELOG entry to Action View
Update guides for new rendering options
Cleanup `ActionController::Rendering`
Fix a fragile test on `action_view/render`
Introduce `render :html` for render HTML string
Introduce `render :plain` for render plain text
Update hash format for render_text_test
Introduce `render :body` for render raw content
Don't use `# =>` when it is not the expression values
Fix the column name [ci skip]
Document the default scopes change on the release notes, CHANGELOG and upgrating guides
Move changelog entry to the top, fix examples indent [ci skip]
...
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
actionview/CHANGELOG.md
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | | |
Thanks Godfrey Chan for reporting this!
Fixes: CVE-2014-0080
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master:
Revert "Merge pull request #13344 from ccutrer/fix-from-default-select"
No need to use symbols
Don't skip tests if they are not broken. Just don't define they
Fix typo [ci skip]
Resolve encoding issues with arrays of hstore (bug 11135).
Fix coffeescript sample [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 3ea840355409dc205a9e0d027fc09f1452636969, reversing
changes made to e4cde5d58cbb09d1843796f96ba86225ff94fe05.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/query_methods.rb
Reason: using `from` without `select` should not change the select list
to SELECT * because it can lead different query results. If it is needed
to change the table to a subquery or a view you can pass a table alias
in the `from` call or use `select('subquery.*')`.
Fixes #14049.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We didn't have enough encoding for the wire protocol to store an array
of hstore types. So, further encode any hstore that is an array member.
Whilst we're here, ensure it's an HashWithIndifferentAccess being
returned, to be consistent with other serialized forms, and add testing
for arrays of hstore.
So now the following migration:
enable_extension "hstore"
create_table :servers do |t|
t.string :name
t.hstore :interfaces, array: true
end
produces a model that can used like this, to store an array of hashes:
server = Server.create(name: "server01", interfaces: [
{ name: "bge0", ipv4: "192.0.2.2", state: "up" },
{ name: "de0", state: "disabled", by: "misha" },
{ name: "fe0", state: "up" },
])
More at http://inopinatus.org/2013/07/12/using-arrays-of-hstore-with-rails-4/
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master: (311 commits)
Add a missing changelog entry for #13981 and #14035
Revert "Fixed plugin_generator test"
implements new option :month_format_string for date select helpers [Closes #13618]
add factory methods for empty alias trackers
guarantee a list in the alias tracker so we can remove a conditional
stop exposing table_joins
make most parameters to the AliasTracker required
make a singleton for AssociationScope
pass the association and connection to the scope method
pass the tracker down the stack and construct it in the scope method
clean up add_constraints signature
remove the reflection delegate
remove klass delegator
remove railties changes. fixes #14054
remove chain delegate
remove scope_chain delegate
Add verb to sanitization note
fix path shown in mailer's templates
updated Travis build status image url
fix guide active_support_core_extensions. add Note to String#indent [ci skip]
...
Conflicts:
activerecord/lib/active_record/associations/join_dependency.rb
activerecord/test/cases/associations/association_scope_test.rb
|
| | |
| | |
| | |
| | |
| | | |
AssociationScope no longer maintains state, so we're safe to keep a
singleton and save on GC time
|
| | | |
|
| | | |
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
hdabrows/drop-correct-index-when-reverting-migration
Drop the correct index after reverting a migration
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously when reverting a migration which added a named index it
would instead drop a corresponding index with matching columns but
without a name.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
remove created state after test execution, not before the next test.
This prevents the leak of the `ex` table outside of a single test.
|
| |/ /
| | |
| | |
| | | |
This should make it harder to accidentally break this test.
|
| | | |
|
| | |
| | |
| | |
| | | |
check it is handles empty statement
|
| |\ \
| | | |
| | | | |
Reaper has access to threadsafe active? call
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
context in validation goes through has many relationship
|
| | | | | |
|
| | |/ /
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It should not save the parent record when the nested attributes are
invalid.
Test case to cover #8194.
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
If the test is run in a timezone that is behind UTC it fails because
the time generated is ahead of 0000-01-01 00:00:00. Just increase the
time subtracted so that timezone has no effect.
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | | |
| | | | |
Fixed typos in column_definition_test.rb.
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | | |
This behavior was introduced since Rails 3.1 (207f266ccaaa9cd04cd2a7513ae5598c4358b510)
but the docs were still out of date.
|
| |\ \
| | | |
| | | | |
Make sure transaction state resets after commit
|
| | | |
| | | |
| | | |
| | | | |
[fixes #12566]
|
| |\ \ \
| | |/ /
| |/| |
| | | |
| | | | |
Fortisque/kevin/active_record_HABTM_with_belongs_to
destruction errors out on HABTM w/out primary key
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
PostgreSQL implementation of SchemaStatements#index_name_exists?
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
|
| | |/ /
| |/| | |
|
| |\ \ \
| | | | |
| | | | | |
Associations now raises `ArgumentError` on name conflicts. Closes #13217.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Dangerous association names conflicts include instance or class
methods already defined by `ActiveRecord::Base`.
|
| |/ / / |
|
| |\ \ \
| | | | |
| | | | | |
Let `unscope` ignore non Arel scope.where_values
|
| | | | | |
|
| |\ \ \ \
| | |/ / /
| |/| | | |
Fix regression on .select method
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This was a common pattern:
```
query = author.posts.select(:title)
connection.select_one(query)
```
However `.select` returns a ActiveRecord::AssociationRelation, which has
the bind information, so we can use that to get the right sql query.
Also fix select_rows on postgress and sqlite3 that were not using the binds
[fixes #7538]
[fixes #12017]
[related #13731]
[related #12056]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This behavior is only work out-of-box with minitest and also add a
downside to run after each test case, even if we don't used the travel
or travel_to methods
|
| |\ \ \ \
| | |/ / /
| |/| | | |
find_in_batches should not mutate its argument
|
| | | | | |
|
| | | | | |
|