| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
After #31685 the description says different what
we expect to see in the example. Change `assign that key to be nil` to
`or delete the key/value pair` in order to highlight what is shown in the example.
Fix one more example of removing data from the session in favour of using
`delete` since assigning to `nil` doesn't delete key from it.
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove key from session by using session.delete
You are not deleting a key from session when you assign nil to that key.
* Update guides on how to destroy a user session
In this commit, the user id is removed from session and controller's variables related to the user are nullified.
[Rafael Mendonça França + Rafael Barbolo]
|
|\
| |
| | |
Update rails-ujs readme
|
| |
| |
| | |
Add a note on using `yarn autoclean`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since other views use the `h2` tag, should also use `h2` on
`missing_exact_template.html.erb`.
https://github.com/rails/rails/blob/76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb#L5
https://github.com/rails/rails/blob/76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb#L11
https://github.com/rails/rails/blob/76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb#L5
|
|\ \
| | |
| | | |
Update results of command in Testing guides [ci skip]
|
| | |
| | |
| | |
| | |
| | | |
* Results of command in testing guides are different from actual ones.
* Updated them.
|
|\ \ \
| | | |
| | | | |
Refactor guides javascripts
|
|/ / /
| | |
| | |
| | |
| | | |
* Remove `$` prefix from all variables (`$` prefix means jQuery object)
* Old browsers doesn't support forEach. So use for instead of forEach.
|
|\ \ \
| | | |
| | | | |
:scissors: jQuery for Rails Guides
|
| | | |
| | | |
| | | |
| | | |
| | | | |
* Rewrite with Vanilla JS
* Confirmed with Chrome, Safari, Firefox
|
|\ \ \ \
| |_|/ /
|/| | | |
Fix indentation manually
|
| | | |
| | | |
| | | |
| | | | |
Rubocop auto-correct doesn't work well, so I fixed indentation manually.
|
|\ \ \ \
| | | | |
| | | | | |
Gracefully handle extra "controller" when generating controller
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
In the previous code incorrectly removes intermediate words.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Rubocop 0.54
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fix `.rubocop.yml: Lint/EndAlignment has the wrong namespace - should be Layout` warning
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix duplicated suffix for JobGenerator
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|_|/ / /
|/| | | | | | |
Add test case to ChannelGeneratorTest
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
* Add a test case to ensure avoid duplicated suffix in channel generator
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Reset RAW_POST_DATA between test requests
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
`RAW_POST_DATA` is derived from the `rack.input` header, which changes
with each test request. It needs to be cleared in `scrub_env!`, or all
requests within the same test will see the value from the first request.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Follow up of #32514.
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | | |
samdec/multiple-has-one-through-associations-build-bug
Fix .new with multiple through associations
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This fixes a bug with building an object that has multiple
`has_many :through` associations through the same object.
Previously, when building the object via .new, the intermediate
object would be created instead of just being built.
Here's an example:
Given a GameBoard, that has_one Owner and Collection through Game.
The following line would cause a game object to be created in the
database.
GameBoard.new(owner: some_owner, collection: some_collection)
Whereas, if passing only one of those associations into `.new` would
cause the Game object to be built and not created in the database.
Now the above code will only build the Game object, and not save it.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
So `target.is_a?(Array)` is meaningless, and just use `target.empty?`
instead of `target.blank?`.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Relax assertions in connection config tests
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
At the moment these two ActiveRecord tests pass with `rake test:sqlite3`,
but fail with `ARCONN=sqlite3 bin/test`.
`Rails.root` is defined when running `bin/test`, but not when running
the rake task. When `Rails.root` is defined, `config[:database]` will
look something like `vagrant/rails/activerecord/db/primary.sqlite3`
instead of just `db/primary.sqlite3`.
(See https://github.com/rails/rails/blob/00caf95e14b90782ab17fbd6d2b930844df99980/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L27)
Relaxing `assert_equal` to `assert_match` will allow these tests to pass
regardless of how they are run.
I do have a question why we need both ways to run tests. I have been
using `bin/test` lately, but I see from #32426 that this is not the preferred
method.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
robotdana/preload-through-polymorphic-associations
Preloading through polymorphic associations (still raises for typos on regular associations)
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add `touch_all` method to `ActiveRecord::Relation`
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Create MissingExactTemplate exception with separate template
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
[ci skip] belongs_to in self join association needs optional: true, if it's over 5.0 ver of rails
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
over 5.0 ver of rails
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[ci skip] Improve Rails::SourceAnnotationExtractor documentation
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
After renaming and deprecation of SourceAnnotationExtractor
documentation has been updated to reflect the new name Rails::SourceAnnotationExtractor
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The previous documentation version listed only the default
registered extensions. This was misleading because if more extensions
get registered with
<tt>SourceAnnotationExtractor::Annotation.register_extensions</tt>,
they would be also taken into account. By saying that we consider
all registered extensions we document what happens in reality.
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Allow `primary_key` argument to `empty_insert_statement_value`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
to support Oracle database support identity data type
Oracle database does not support `INSERT .. DEFAULT VALUES`
then every insert statement needs at least one column name specified.
When `prefetch_primary_key?` returns `true` insert statement
always have the primary key name since the primary key value is selected
from the associated sequence. However, supporting identity data type
will make `prefetch_primary_key?` returns `false`
then no primary key column name added.
As a result, `empty_insert_statement_value` raises `NotImplementedError`
To address this error `empty_insert_statement_value` can take
one argument `primary_key` to generate insert statement like this.
`INSERT INTO "POSTS" ("ID") VALUES(DEFAULT)`
It needs arity change for the public method but no actual behavior changes for the bundled adapters.
Oracle enhanced adapter `empty_insert_statement_value` implementation will be like this:
```
def empty_insert_statement_value(primary_key)
raise NotImplementedError unless primary_key
"(#{quote_column_name(primary_key)}) VALUES(DEFAULT)"
end
```
[Raise NotImplementedError when using empty_insert_statement_value with Oracle](https://github.com/rails/rails/pull/28029)
[Add support for INSERT .. DEFAULT VALUES](https://community.oracle.com/ideas/13845)
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix typos related to ActionDispatch::Http::FilterParameters
|
| | | | | | | | | | |
|