| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Provide message to define ActiveSupport::TestCase.name instead.
Allow calling describe with a block, which Minitest::Spec does.
|
|\
| |
| | |
[ci skip] removed singulars section from classify doc
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
https://github.com/chancancode/rails
Conflicts:
activesupport/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The user is expected to explicitly convert the value into an
AS::Duration, i.e. `5.ago` => `5.seconds.ago`
This will help to catch subtle bugs like:
def recent?(days = 3)
self.created_at >= days.ago
end
The above code would check if the model is created within the last 3
**seconds**.
In the future, `Numeric#{ago,until,since,from_now}` should be removed
completely, or throw some sort of errors to indicate there are no
implicit conversion from `Numeric` to `AS::Duration`.
Also fixed & refactor the test cases for Numeric#{ago,since} and
AS::Duration#{ago,since}. The original test case had the assertion
flipped and the purpose of the test wasn't very clear.
|
|\ \
| | |
| | | |
unnecessary checking of `size` with `second regex` if matched with former regex
|
| | | |
|
|\ \ \
| | | |
| | | | |
Link for "New Post" is added in Getting Started guide [ci skip]
|
| | |/
| |/|
| | |
| | |
| | | |
- Earlier(line number 862) it is said to add <%= link_to 'New post', new_post_path %> on posts index page before table tag. But when posts index page html is shown, "New Post" link is missing.
So aaded "New Post" link in this commit
|
|\ \ \
| | | |
| | | | |
Dropped yajl from Gemfile
|
| |/ / |
|
|\ \ \
| |_|/
|/| | |
Requires JSON gem version 1.7.7 or above as it contains an important security fix.
|
| |/
| |
| |
| | |
security fix.
|
|\ \
| | |
| | | |
[ci skip]removed obsolete information about `options` parameter in create method
|
|/ / |
|
|\ \
| |/
|/| |
[ci skip] used new syntax for scopes
|
|/ |
|
|
|
|
|
|
|
|
| |
laurocaetano/fix-uniqueness-validation-for-aliased-attribute
Fix bug when validating the uniqueness of an aliased attribute.
Conflicts:
activerecord/CHANGELOG.md
|
|\
| |
| | |
JSON encoder refactor
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Got all the tests passing again.
Support for `encode_json` has been removed (and consequently the
ability to encode `BigDecimal`s as numbers, as mentioned in the
previous commit). Install the `activesupport-json_encoder` gem
to get it back.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is because the new encoder will no longer support encode_json.
Therefore our only choice is to return `to_i` or `to_s` in
`BigDecimal#as_json`. Since casting a BigDecimal to an integer is
most likely a lossy operation, we chose to encode it as a string.
Support for encoding BigDecimal as a string will return via the
`activesupport-json_encoder` gem.
|
| | |
|
| |
| |
| |
| | |
correctly
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
changed update counter to act on unscoped model
|
|/ |
|
|\
| |
| | |
remove leftover firebird adapter tests.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ci skip]
This is a follow up to #12609 and integrates #12158.
Thanks @aspiers.
Closes #12158.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents the following error when a MySQL index on a foreign key
column is renamed:
```
ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_engines_on_car_id': needed in a foreign key constraint: DROP INDEX `index_engines_on_car_id` ON `engines`
```
refs: #13038.
|
|\
| |
| | |
Raise `RecordNotDestroyed` when children can't be replaced
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #12812
Raise `ActiveRecord::RecordNotDestroyed` when a child marked with
`dependent: destroy` can't be destroyed.
The following code:
```ruby
class Post < ActiveRecord::Base
has_many :comments, dependent: :destroy
end
class Comment < ActiveRecord::Base
before_destroy do
return false
end
end
post = Post.create!(comments: [Comment.create!])
post.comments = [Comment.create!]
````
would result in a `post` with two `comments`.
With this commit, the same code would raise a `RecordNotDestroyed`
exception, keeping the `post` with the same `comment`.
|
| |
|
|\
| |
| | |
Fix some minor typos
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit f4a5a9ea4d183f4102796215d4502c46dbe3e52b, reversing
changes made to 7ccb482181ee6c47c765406009018a15172812de.
Reason:
The logic is different, the first call to #option_value_selected? is for
the :selected option (the argument is the "selected" variable), the second
call is for the :disabled option (the argument is the "disabled" variable).
|
|\ \
| | |
| | | |
avoiding calling of #option_value_selected? two times
|
| | | |
|
|\ \ \
| |_|/
|/| | |
`delgated` => `delegated`
|
| | | |
|
|\ \ \
| | | |
| | | | |
Better error message for typos in assert_response argument.
|
|/ / /
| | |
| | |
| | |
| | | |
This commit makes it really easy to debug errors due to typos like
"assert_response :succezz".
|
|\ \ \
| | | |
| | | | |
Added `rewhere` usage to AR querying guides
|