- 03 1月, 2015 21 次提交
-
-
由 claudiob 提交于
After this commit, returning `false` in a callback will display a deprecation warning to make developers aware of the fact that they need to explicitly `throw(:abort)` if their intention is to halt a callback chain. This commit also patches two internal uses of AS::Callbacks (inside ActiveRecord and ActionDispatch) which sometimes return `false` but whose returned value is not meaningful for the purpose of execution. In both cases, the returned value is set to `true`, which does not affect the execution of the callbacks but prevents unrequested deprecation warnings from showing up.
-
由 claudiob 提交于
This commit changes arguments and default value of CallbackChain's :terminator option. After this commit, Chains of callbacks defined **without** an explicit `:terminator` option will be halted as soon as a `before_` callback throws `:abort`. Chains of callbacks defined **with** a `:terminator` option will maintain their existing behavior of halting as soon as a `before_` callback matches the terminator's expectation. For instance, ActiveModel's callbacks will still halt the chain when a `before_` callback returns `false`.
-
由 eileencodes 提交于
Add missing nodoc's Change `assoc_klass` argument name to `association_klass` Change `prev_reflection` argument name to `previous_reflection` Change `prev` to `previous_reflection` in `#get_chain` Switch use of `refl` and `reflection` in `#get_chain` so main parameter is not abbreviated. Add missing space in `#add_constraints`
-
由 eileencodes 提交于
This moves the `#type_caster` from the `aliased_table_for` and into the initialize of the `alias_tracker`.
-
由 eileencodes 提交于
`yield` instead of relying on checking if the reflection is equal to the `chain_head`.
-
由 eileencodes 提交于
Instead of initializing an empty connection use the base table name instead. Split up and refactor `#create` to be 2 methods `#create` and `#create_with_joins`. Removes the need to update the count by 1 on initialzing a JoinDependency.
-
由 eileencodes 提交于
This moves `alias_candidate` out of the `ReflectionProxy` and into the `AbstractReflection` so it is shared by all reflections. Change `alias_name` to a method and and remove assignment in `#get_chain`.
-
由 eileencodes 提交于
After the refactorings we're only using the connection and not the alias tracker anymore. This builds on commit 18019. Reuse the already available `@connection` to reduce the surface area of the alias tracker's API. We can then remove the `attr_reader` because the connection is already available.
-
由 eileencodes 提交于
This makes the `#alias_name` more functional.
-
由 eileencodes 提交于
Move `RuntimeReflection` and `PolymorphicReflect` into Reflection. This allows the methods to inherit from `ThroughReflection` and DRY up the methods by removing duplicates.
-
由 eileencodes 提交于
The linked list lets us use a loop in `#add_constraints` and completely remove the need for indexing the iteration becasue we have access to the next item in the chain.
-
由 eileencodes 提交于
By concatnating the `ReflectionProxy` with the `chain` we remove the need for `#construct_tables` because the `chain` is now in the correct order (order of the chain DOES matter).
-
由 eileencodes 提交于
Putting the `#alias_name` into ReflectionProxy means we don't have to cache the `#alias_name` globally anymore - it's not cached per query.
-
由 eileencodes 提交于
`is_first_chain`, `items` and `klass` are no longer beneficial and can be called directly instead of via their assignments - because they are each only used once.
-
由 eileencodes 提交于
Move method structure into reflection classes for accessibly on each reflection rather than by traversing the chain.
-
由 eileencodes 提交于
The `RuntimeReflection` class allows the reflection to be accessed at runtime - then we always know which reflection we are accessing in the chain. The `#get_chain` method then allows us to recursively access the chain through the `RuntimeReflection`.
-
由 eileencodes 提交于
`#constraints` builds a flattened version of `scope_chain` to allow it to be accessible without requiring an index when iterating over the `scope_chain`
-
由 Rafael Mendonça França 提交于
It already treats the message
-
由 Robin Dupret 提交于
-
由 Ryuta Kamizono 提交于
`visit_ChangeColumnDefinition` is the same "CHANGE column_name " + `visit_ColumnDefinition(o)`.
-
由 Ryuta Kamizono 提交于
In most cases, `create_table_definition` called by table_name (the first argument) only.
-
- 02 1月, 2015 14 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Ryuta Kamizono 提交于
Incompatible to rounding behavior between MySQL 5.6 and earlier. In 5.5, when you insert `2014-08-17 12:30:00.999999` the fractional part is ignored. In 5.6, it's rounded to `2014-08-17 12:30:01`: http://bugs.mysql.com/bug.php?id=68760
-
由 Ryuta Kamizono 提交于
-
由 Rafael Mendonça França 提交于
This constant may be define for auxiliar gems like rails-html-sanitizer and these methods call will fail.
-
由 Sean Griffin 提交于
So we can change the arity later.
-
由 Sean Griffin 提交于
A few of the tests weren't testing anything of value. The IP Address tests are testing the type, not behavior of the connection adapter. There are two CVE regression tests which are important, but don't have a good place to go, so I've left them alone for now, as they call `quote` and the focus right now is removing `column` from `type_cast`
-
由 Sean Griffin 提交于
The column itself has no actual impact on the return value. These were actually testing the behavior of the type object, which is sufficiently covered elsewhere.
-
由 Sean Griffin 提交于
The behavior tested by the removed lines is sufficiently covered elsewhere.
-
由 Sean Griffin 提交于
The string encoding test wasn't using the types for anything. The boolean casting test included logic that should be in the tests for the types, and the string test was legitimately not testing anything useful.
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
The validator has access to richer type information
-
由 Sean Griffin 提交于
SQL has mechanisms we can use to copy data from one table into another.
-
由 Sean Griffin 提交于
As we move towards removing the types from the column objects, any remaining places which have access to richer type information should be using it.
-
由 Sean Griffin 提交于
The column is no longer used for anything besides type casting, which is what we're trying to remove from the column entirely.
-
- 31 12月, 2014 5 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Arun Agrawal 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
This error only happens when the foreign key is missing. Before this fix the following exception was being raised: NoMethodError: undefined method `val' for #<Arel::Nodes::BindParam:0x007fc64d19c218> Now the message is: ActiveRecord::UnknownAttributeError: unknown attribute 'foreign_key' for Model.
-
由 brainopia 提交于
-