| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is a follow up to #13926.
/cc @fxn
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolve the following error when running `bundle exec rake guides:generate:html`:
```
/Users/senny/.rbenv/versions/2.0.0-p353/bin/ruby rails_guides.rb
Generating 2_2_release_notes.md as 2_2_release_notes.html
/Users/senny/Projects/rails/guides/rails_guides/helpers.rb:17:in `documents_by_section': uninitialized constant RailsGuides::Helpers::YAML (ActionView::Template::Error)
from /Users/senny/Projects/rails/guides/rails_guides/helpers.rb:32:in `docs_for_menu'
from /Users/senny/Projects/rails/guides/source/layout.html.erb:56:in `block in ___sers_senny__rojects_rails_guides_source_layout_html_erb___3094858039481335962_70118647133480'
from /Users/senny/Projects/rails/guides/source/layout.html.erb:54:in `each'
from /Users/senny/Projects/rails/guides/source/layout.html.erb:54:in `___sers_senny__rojects_rails_guides_source_layout_html_erb___3094858039481335962_70118647133480'
from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:143:in `block in render'
from /Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:161:in `instrument'
from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:337:in `instrument'
from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:141:in `render'
from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:47:in `render_template'
from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:17:in `render'
from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/renderer.rb:42:in `render_template'
from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/renderer.rb:23:in `render'
from /Users/senny/Projects/rails/actionview/lib/action_view/helpers/rendering_helper.rb:24:in `render'
from /Users/senny/Projects/rails/guides/rails_guides/markdown.rb:160:in `render_page'
from /Users/senny/Projects/rails/guides/rails_guides/markdown.rb:25:in `render'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:205:in `block in generate_guide'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:195:in `open'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:195:in `generate_guide'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:144:in `block in generate_guides'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:142:in `each'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:142:in `generate_guides'
from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:97:in `generate'
from rails_guides.rb:63:in `<main>'
rake aborted!
Command failed with status (1): [/Users/senny/.rbenv/versions/2.0.0-p353/bi...]
/Users/senny/Projects/rails/guides/Rakefile:11:in `block (3 levels) in <top (required)>'
Tasks: TOP => guides:generate:html
(See full trace by running task with --trace)
```
|
|\
| |
| | |
Fixed minor typo [ci skip]
|
|/ |
|
|\
| |
| | |
Fixes the camelCase variable name in the docs [ci skip]
|
|/ |
|
|\
| |
| | |
Adding a documentation example and a test to button_to with path
|
|/
|
| |
I did not see in the docs that `button_to` supports not only URLs but paths as well. I documented this functionality with a unit tests and added an example to the docs as well.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Deprecate custom BigDecimal serialization
Conflicts:
activesupport/CHANGELOG.md
|
| |
| |
| |
| |
| |
| | |
This was backported for Ruby 1.8 support and is no longer needed.
Signed-off-by: David Celis <me@davidcel.is>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rails currently provides an extension to BigDecimal that redefines how
it is serialized to YAML. However, as noted in #12467, this does not
work as expected. When ActiveSupport is required, BigDecimal YAML
serialization does not maintain the object type. It instead ends up
serializing the number represented by the BigDecimal itself which, when
loaded by YAML later, becomes a Float:
```ruby
require 'yaml'
require 'bigdecimal'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
require 'active_support/all'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
```
@tenderlove posits that we should deprecate the custom BigDecimal
serialization and let Ruby handle it. For the time being, users who
require this serialization for backwards compatibility can manually
`require 'active_support/core_ext/big_decimal/yaml_conversions'`.
This will close #12467 and deprecate the custom BigDecimal#to_yaml.
Signed-off-by: David Celis <me@davidcel.is>
|
| | |
|
| |
| |
| |
| |
| |
| | |
Since its conception arel was made to be private API of Active Record.
If users want to use arel features directly we should provide a way
using the Active Record API without exposing the arel implementation.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
PostgreSQL implementation of SchemaStatements#index_name_exists?
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Do not discard query parameters on requests that use wrap_parameters
Conflicts:
actionpack/CHANGELOG.md
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fixes issue with parsing whitespace content back from database - fixes #13907
|
| | |_|/
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Boolean parser blows up on a Fixnum.
Conflicts:
activesupport/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Boolean parsing breaks on non strings (i.e. integer 1|0)
- Symbol parsing breaks on non strings.
- BigDecimal parsing breaks due to missing require.
- Update changelog.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
LookupContext is eagerly loaded, and FallbackFileSystemResolver is
referenced at the class level. Just require the resolver from the
eagerly loaded class rather than jumping through autoload hoops
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We can just require the file rather than going through the autoload
indirection
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Extend the solution from the fix for #12163 to the general case where
`Time` methods are wrapped with a time zone.
Fixes #12596.
|
|\ \ \ \
| | | | |
| | | | | |
Updated association_basics.md
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Updated association_basics.md to include how to write migrations for self joins
Update association_basics.md
Corrected the update
Update association_basics.md
Typo fix
Changed :employee to :manager
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Document default trim mode for Erubis and affected ERB tags. Fixes #12963 [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes #12963
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Associations now raises `ArgumentError` on name conflicts. Closes #13217.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Dangerous association names conflicts include instance or class
methods already defined by `ActiveRecord::Base`.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Remove unused variable.
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
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]
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Add CreateMigration action
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This Thor-action isolates the logic whether to (over-)write migration and
what is shown to the user. It's modelled after Thor's CreateFile-action.
This solves the issue that removing a non-existing migration, tried to
remove the template-path (#13588).
Related issues: #12674
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Replace Post model with Article model in getting started guide [ci skip]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Used Article model instead of Post as it may confuse with 'post'
requests
- Tried to wrap the guide to 80 chars lines as much as possible.
- Removed unused image
- Fixes #13764
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add `travel_back` to remove stubs from `travel` and `travel_to` and remove auto-rollback after each test case
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
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
|