- 01 8月, 2014 7 次提交
-
-
由 Rafael Mendonça França 提交于
Refactor join_keys to remove complex conditionals
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
These methods mutate the path variable/argument so there is no need to reassign it every time.
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
- 31 7月, 2014 33 次提交
-
-
由 eileencodes 提交于
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.
-
由 Rafael Mendonça França 提交于
Merge pull request #16351 from eileencodes/finish-refactoring-macro-to-eliminate-checking-against-symbols Redefine macro checks for reflections
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
This is not storying the RouteSet instance anywhere as the other examples in the file, so no need to use #tap.
-
由 Yves Senn 提交于
Add tests to ensure default proc is used when `HashWithIndifferentAccess' is initialized with a block
-
由 Gordon Chan 提交于
Add tests to ensure default proc is used when `HashWithIndifferentAccess' is initialized with a block
-
由 Aaron Patterson 提交于
Raise a descriptive error if non-positive integer passed to in_groups_of
-
由 Xavier Shay 提交于
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.
-
由 Carlos Antonio da Silva 提交于
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.
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
Removed unnecessary call to 'convert_key' in 'HashWithIndifferentAccess#to_hash'
-
由 Carlos Antonio da Silva 提交于
We are using blocks here so we have access to the environment around them, no need for globals.
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Aaron Patterson 提交于
every call to default_resources_path_names allocates a new hash, no need to dup
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
this makes scope rollback much easier
-
由 Gordon Chan 提交于
All the keys are already Strings by virtue of being a HashWithIndifferentAccess.
-
由 eileencodes 提交于
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.
-
由 Aaron Patterson 提交于
just ask whether or not the route is defined
-
由 Aaron Patterson 提交于
we can `super` in to the previous implementation.
-
由 Aaron Patterson 提交于
we already know what helpers are path helpers, so just iterate through that list and define the helpers with warnings
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
this lets us avoid hard coding a regexp for separating path and url helpers in the clear! method.
-
由 Aaron Patterson 提交于
-
由 Xavier Noria 提交于
Deprecate `*_path` methods in mailers
-