diff options
author | Henrik Hodne <dvyjones@dvyjones.com> | 2012-05-20 01:29:13 +0200 |
---|---|---|
committer | Henrik Hodne <dvyjones@dvyjones.com> | 2012-05-20 01:29:13 +0200 |
commit | fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a (patch) | |
tree | 1e4fd51d0d58cb5b5f210eeb6842ca3ada999243 /activerecord/lib/active_record/reflection.rb | |
parent | 7eb09aed874dbb5f50a9ac0d0dec22e42f6161be (diff) | |
download | rails-fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.tar.gz rails-fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.tar.bz2 rails-fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.zip |
Remove blank trailing comments
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace
with the first match, and voilĂ ! Note that the regex matches a little bit too
much, so you probably want to `git add -i .` and go through every single diff
to check if it actually should be changed.
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index c380b5c029..17e388a1d4 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -42,7 +42,6 @@ module ActiveRecord # Returns the AggregateReflection object for the named +aggregation+ (use the symbol). # # Account.reflect_on_aggregation(:balance) # => the balance AggregateReflection - # def reflect_on_aggregation(aggregation) reflection = reflections[aggregation] reflection if reflection.is_a?(AggregateReflection) @@ -57,7 +56,6 @@ module ActiveRecord # # Account.reflect_on_all_associations # returns an array of all associations # Account.reflect_on_all_associations(:has_many) # returns an array of all has_many associations - # def reflect_on_all_associations(macro = nil) association_reflections = reflections.values.grep(AssociationReflection) macro ? association_reflections.select { |reflection| reflection.macro == macro } : association_reflections @@ -67,7 +65,6 @@ module ActiveRecord # # Account.reflect_on_association(:owner) # returns the owner AssociationReflection # Invoice.reflect_on_association(:line_items).macro # returns :has_many - # def reflect_on_association(association) reflection = reflections[association] reflection if reflection.is_a?(AssociationReflection) @@ -386,7 +383,6 @@ module ActiveRecord # has_many :taggings # has_many :tags, :through => :taggings # end - # def source_reflection @source_reflection ||= source_reflection_names.collect { |name| through_reflection.klass.reflect_on_association(name) }.compact.first end @@ -401,7 +397,6 @@ module ActiveRecord # # tags_reflection = Post.reflect_on_association(:tags) # taggings_reflection = tags_reflection.through_reflection - # def through_reflection @through_reflection ||= active_record.reflect_on_association(options[:through]) end @@ -488,7 +483,6 @@ module ActiveRecord # Gets an array of possible <tt>:through</tt> source reflection names: # # [:singularized, :pluralized] - # def source_reflection_names @source_reflection_names ||= (options[:source] ? [options[:source]] : [name.to_s.singularize, name]).collect { |n| n.to_sym } end |