| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | |
| | |
| | |
| | | |
Fixes #18237
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is no longer required now that we are injecting a type caster
object into the Arel table, with the exception of uniqueness
validations. Since it calls `ConnectionAdapter#type_cast`, the value has
already been cast for the database. We don't want Arel to attempt to
cast it further, so we need to continue wrapping it in a quoted node.
This can potentially go away when this validator is refactored to make
better use of `where` or the predicate builder.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This API will require much less consuming code to change to accomodate
the removal of automatic type casting from Arel. As long as the
predicates are constructed using the `arel_table` off of an AR subclass,
there will be no changes that need to happen.
|
|\ \ \
| | | |
| | | | |
`eager_load` preserves readonly flag for associations
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | | |
It is already docummented at persistence.rb.
[ci skip]
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | | |
Fix html_safe string access modifying frozen values
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the object being accessed currently returns `html_safe?` as true,
we used to set `@html_safe` variable as true on new object created. When doing something like
x = 'Hello'.html_safe
x[/a/, 1]
would throw an error on ruby 2.2, since when nothign gets matched nil is returned by the code and it tries to set `@html_safe` value to true,
which would error since starting 2.2 nil is frozen.
This change adds a safety net to avoid setting `@html_safe = true` on frozen objects.
Fixes #18235
|
|\ \
| | |
| | | |
adjust args of Bundler.require in guides [ci skip]
|
|/ /
| |
| |
| |
| |
| | |
Arguments of Bundler.require of generator has been changed from rails4.0.4.
https://github.com/rails/rails/blob/v4.0.4/railties/lib/rails/generators/rails/app/templates/config/application.rb#L16
|
|\ \
| | |
| | | |
Expectation comes first
|
|/ / |
|
| | |
|
|\ \
| | |
| | | |
Require Ruby 2.2 for Rails 5.0
|
| | |
| | |
| | |
| | |
| | | |
Stems from [this comment](https://github.com/rails/rails/pull/18203#issuecomment-68138096) by @robin850
and by the blog post http://weblog.rubyonrails.org/2014/12/19/Rails-4-2-final
|
|\ \ \
| | | |
| | | | |
Actually autoload all second-level directories called `app/*/concerns`
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Update example test documentation
|
|/ / / /
| | | |
| | | | |
Example does not work with session headers, should use request headers. [ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
Fix warning: `*' interpreted as argument prefix
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Provide :touch option to save() to accommodate saving without updating t...
|
|/ / / /
| | | |
| | | |
| | | | |
timestamps. [#18202]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We only support classes which provide a no-args constructor to use as a
default value. We can provide a more helpful error message if we catch
this when `serialize` is called, rather than letting it error when you
try to assign the attribute.
Fixes #18224
|
|\ \ \ \
| | | | |
| | | | | |
Add bigint primary key support for MySQL.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Example:
create_table :foos, id: :bigint do |t|
end
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | | |
/cc @sgrif
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Most of the documentation very closely mirrors the matching
docs from `SchemaStatements`. I reduced duplicated copy and
added links to the underlying methods for the user to follow.
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
Refactor `PostgreSQL::TableDefinition#primary_key`
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
Because call the `column` method and set the `options[:primary_key]` is
handled at `super`, here need only treat the `options[:default]`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Part of a larger refactoring to remove type casting behavior from Arel
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There are several valid cases where right now we can't determine the
association's class in a call to `where`. In these cases, we can fall
back to casting by looking up the column from the connection adapter
(which is what happens right now when we fall through to Arel)
This is ugly, and since we're trying to separate the concept of a type
from a column, I'd like to remove it in the future. The problem
basically comes down to this:
Liquid.joins(molecules: :electrons)
.where("molecules.name" => "something", "electrons.name" => "something")
The hash in this case will turn into:
{
molecules: { name: "something" },
electrons: { name: "something" },
}
What we actually need is:
{
molecules: {
name: "something",
electrons: { name: "something" },
}
}
/cc @mrgilman
|