| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit a7f4b0a1231bf3c65db2ad4066da78c3da5ffb01.
Conflicts:
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/persistence.rb
activerecord/test/cases/base_test.rb
activerecord/test/cases/dirty_test.rb
activerecord/test/cases/timestamp_test.rb
|
|\
| |
| | |
Refactored common date and time calculations.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Added the `DateAndTime::Calculations` module that is included in Time
and Date. It houses common calculations to reduce duplicated code.
* Simplified and cleaned-up the calculation code.
* Removed duplication in tests by adding a behavior module for shared
tests. I also added some missing tests.
|
|\ \
| | |
| | | |
Allow to pass Symbol or Proc into :limit option of #accepts_nested_attributes_for
|
| | | |
|
| | |
| | |
| | |
| | | |
#accepts_nested_attributes_for
|
|/ /
| |
| |
| |
| | |
Instead of building a Blog::Post instance for every test in form helper
tests, just build it in the test that uses it.
|
|\ \
| | |
| | | |
correct handling of date selects when using both disabled and discard options
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
we should take disabled option not only from `html_options` hash but from
`options` hash too like `build_select` method does it. So
datetime_select("post", "updated_at", { :discard_minute => true }, { :disabled => true })
datetime_select("post", "updated_at", :discard_minute => true , :disabled => true)
both these variants work now
closes #7431
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
We simplify two things here: First since * is greedy it is enough to go
look for the rightmost ::, no need to ask the regexp engine to match the
rest of the string since we are not validating anything, only capturing.
The second simplification comes from using a look-ahead assertion, that
allows us to have the capture in $&, thus removing the need of a group.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Accept a symbol for `:in` option on inclusion and exclusion validators
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Extract ActiveRecord::SessionStore from Rails
|
| | |
| | |
| | |
| | |
| | |
| | | |
Tell people to install `activerecord-session_store` gem when it's not
installed instead ofraising `NameError` on missing
`ActionDispatch::Session::ActiveRecordStore`.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| | |
This functionality will be available from gem
`active_record-session_store` instead.
|
|\ \
| | |
| | | |
Fix tests that depend on run order
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The new regexp has less work to do, we anchor a fixed string at the end
and need no group.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Model.select takes a variable list of arguments
|
|/ /
| |
| |
| |
| |
| | |
This is a cleaner version of #6916.
Closes #3165.
|
|\ \
| | |
| | | |
Update the documentation for the :autosave option on belongs_to
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I've noticed a caveat with the :autosave option biting people before.
Questions arise about why they must explicitly save an associated object
in their own before_save callbacks. I've updated the documentation as
such to note to users that the :autosave callback occurs before any
user defined callbacks. They must save the associated record themselves
if altering it in their own callbacks.
Signed-off-by: David Celis <david@davidcelis.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit b0ab8dc0b2b0f580ffe5ac9ff57fd13152e18577
because it was removing the contents of the message when we
did not have any tag. A test case is also committed.
|
| |
| |
| |
| |
| |
| |
| | |
The reason the test was failing was because when the test
invokes `app.config`, the app is loaded and, as `eager_load`
is set to true, it disables the dependency loading mechanism,
so controllers that are later defined are not loaded.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The revised test assumed that the default permissions of a file
matched the umask of the process, but in the general case that
depends also on the file system. This test was failing in the
/vagrant shared folder of Rails development boxes.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Extended documentation for `time_ago_in_words` helper
|
| | | |
|
|\ \ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 8cb9460437eddde6952fbebbc969203cd4d00294.
Reason: #7377 was merged and it fixes this behavior.
|
| | | |
| | | |
| | | |
| | | | |
Fixed bug in the example code. A bit related to rails issue in
https://github.com/rails/rails/issues/3223
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Make doc output in grouped_options_for_select divider example match
actual output. The options groups were in backwards order of actual.
|
|\ \ \ \
| | | | |
| | | | | |
Remind user a good way to generate a secret code [ci skip]
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
AR::Relation#model would be a better API than AR::Relation#klass
|