| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Ruby generally does not use the is_* prefix on predicate methods.
|
| |_|_|_|/
|/| | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Null transaction
|
| | | | | | |
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Transactions refactoring - 2
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
there's no reason to to_sym the string if it doesn't match the regexp
anyway
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
hash lookup should be faster than searching an array.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add ActiveRecord::Tasks::DatabaseTasks.migrate
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This extracts the logic that was embedded in a Rake task into a static
method.
Bonus: the first test for `rake db:migrate`
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
[doc] Clarify how the ConnectionHandler works
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This makes the implicit description of how connection pooling works a
little more explicit. It converts the examples of a model hierarchy into
actual Ruby code and demonstrates how the key structure of the
database.yml relates to the `establish_connection` method.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
eileencodes/refactor-join_keys-usage-in-reflection
Refactor join_keys to remove complex conditionals
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Pushing conditionals down to through reflection
Only the through association needs the part of this conditional
that deals with belongs to and polymorphic? so that can be pushed
down into the ThroughReflection reducing the conditionals.
Remove conditional because we can delegate join keys to source reflection
Remove need for source_macro checking
By adding join_id_for to the other reflections we remove the need
to cehck against the source_macro and can reduce the conditioanl
from the original join_id_for(owner)
Using polymorphism instead of testing the source_macro
This case statement in join_association is almost exactly the same
as the original join_keys code. Testing taht theory by creating a
new join_dependency_keys(assoc_klass) method.
Refactor join_keys further to be more concise
Fixed format of "#:nodoc:" to "# :nodoc:" where I added them to this
file.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
These methods mutate the path variable/argument so there is no need
to reassign it every time.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
eileencodes/finish-refactoring-macro-to-eliminate-checking-against-symbols
Redefine macro checks for reflections
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Now that we define the macro on the reflection type we no longer
need to check `macro == :what` on each type for `belongs_to?` or
`has_one?` etc. These now default to false unless it's defined
in the reflection class.
Reuse existing belongs_to? method to check macros
We don't need to do `:belongs_to == macro` anymore becasue we
have a `belongs_to?` method. I didn't find this being used
anywhere for `has_one?` or `collection?` since they were already
fixed.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is not storying the RouteSet instance anywhere as the other
examples in the file, so no need to use #tap.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add tests to ensure default proc is used when `HashWithIndifferentAccess' is initialized with a block
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
initialized with a block
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Raise a descriptive error if non-positive integer passed to in_groups_of
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is more consistent than the current behaviour of raising a
`ZeroDivisionError: divided by 0` error when 0 is given, which can be
non-obvious especially if `in_groups_of` is part of a longer chain of
methods.
The negative case was ok - "ArgumentError: invalid slice size" - but
this error is clearer still.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The message passed to Minitest's assert_raise is used as output in case
the assertion fails, but we can test against the exact message by using
the actual exception object that is returned from the assert_raise call.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Removed unnecessary call to 'convert_key' in 'HashWithIndifferentAccess#to_hash'
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
All the keys are already Strings by virtue of being a HashWithIndifferentAccess.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We are using blocks here so we have access to the environment around
them, no need for globals.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
every call to default_resources_path_names allocates a new hash, no need
to dup
|
| | | | | | | | |
|
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | | |
this makes scope rollback much easier
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | | |
just ask whether or not the route is defined
|