1. 26 7月, 2014 1 次提交
  2. 24 7月, 2014 2 次提交
  3. 22 7月, 2014 1 次提交
  4. 21 7月, 2014 1 次提交
  5. 19 7月, 2014 2 次提交
    • S
      Fixed typo in comment · 44bf33c9
      Steve 提交于
      44bf33c9
    • S
      create_join_table uses same logic as HABTM reflections · a013b082
      Stefan Kanev 提交于
      Before this change, create_join_table would not remove the common prefix
      in the join table name, unlike ActiveRecord::Reflections. A HABTM
      between Music::Artist and Music::Record would use a table
      music_artists_records, while create_join table would create
      music_artists_music_records.
      a013b082
  6. 18 7月, 2014 1 次提交
  7. 17 7月, 2014 3 次提交
  8. 16 7月, 2014 8 次提交
  9. 15 7月, 2014 5 次提交
  10. 14 7月, 2014 1 次提交
  11. 12 7月, 2014 1 次提交
  12. 11 7月, 2014 4 次提交
  13. 08 7月, 2014 1 次提交
    • E
      Begin refactoring ThroughReflection · f8d2899d
      eileencodes 提交于
      This allows us to decouple AssociationReflection and
      ThroughReflection making ThroughReflection it's own Reflection
      bucket in a way. The benefit of this is to be able to remove
      checks against the macro's symbol for exmaple `macro == :belongs_to`.
      
      Get all tests passing again
      
      Some of the methods that used to be inherited from MacroReflection
      through AssociationReflection were no longer getting passed through.
      They needed to be duplicated into the ThroughReflection. I will
      extract these out into a separate class.
      
      Refactor shared methods into strategy object
      
      Now that we've separated ThroughReflection and AssociationReflection
      we can combine shared methods into one class to avoid duplication.
      
      Break out class for each type of reflection
      
      This creates a class for each reflection type (has_many, has_one,
      belongs_to and habtm). We then can remove the need to set the macro
      symbol in each initialization.
      
      Tests were updated to reflect these changes because creation of
      these reflections is now different.
      
      Remove need for @collection instance var
      
      We now define `collection?` as `false` by default and set it to
      `true` in `has_and_belongs_to_many` and `has_many` reflections.
      This removes the need for the `@collection` instance variable.
      
      Raise exception on unknown macro types
      
      We shouldn't accept just any macro when creating reflections. An
      unrecongnized AssociationReflection raises an error. Tests in
      `reflection_test` were updated to reflect these new changes.
      `:has_and_belongs_to_many` macro tests were removed because we no
      longer internally return HABTM.
      f8d2899d
  14. 07 7月, 2014 6 次提交
  15. 06 7月, 2014 3 次提交