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 /activemodel/lib | |
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 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attribute_methods.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/callbacks.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/conversion.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/lint.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/mass_assignment_security.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/observing.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/serialization.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/validates.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/validator.rb | 2 |
11 files changed, 0 insertions, 16 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 99918fdb96..61985e241b 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -53,7 +53,6 @@ module ActiveModel # hash value. # # Hash keys must be strings. - # module AttributeMethods extend ActiveSupport::Concern diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb index ebb4b51aa3..50709e5ee1 100644 --- a/activemodel/lib/active_model/callbacks.rb +++ b/activemodel/lib/active_model/callbacks.rb @@ -83,7 +83,6 @@ module ActiveModel # # obj is the MyModel instance that the callback is being called on # end # end - # def define_model_callbacks(*callbacks) options = callbacks.extract_options! options = { diff --git a/activemodel/lib/active_model/conversion.rb b/activemodel/lib/active_model/conversion.rb index d7f30f0920..cea11c1a18 100644 --- a/activemodel/lib/active_model/conversion.rb +++ b/activemodel/lib/active_model/conversion.rb @@ -22,7 +22,6 @@ module ActiveModel # cm.to_key # => nil # cm.to_param # => nil # cm.to_partial_path # => "contact_messages/contact_message" - # module Conversion extend ActiveSupport::Concern diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index aba6618b56..7b311a50ff 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -317,7 +317,6 @@ module ActiveModel # * <tt>activemodel.errors.messages.blank</tt> # * <tt>errors.attributes.title.blank</tt> # * <tt>errors.messages.blank</tt> - # def generate_message(attribute, type = :invalid, options = {}) type = options.delete(:message) if options[:message].is_a?(Symbol) diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb index 88b730626c..2c7f2a9334 100644 --- a/activemodel/lib/active_model/lint.rb +++ b/activemodel/lib/active_model/lint.rb @@ -52,7 +52,6 @@ module ActiveModel # # Returns a string giving a relative path. This is used for looking up # partials. For example, a BlogPost model might return "blog_posts/blog_post" - # def test_to_partial_path assert model.respond_to?(:to_partial_path), "The model should respond to to_partial_path" assert_kind_of String, model.to_partial_path @@ -74,7 +73,6 @@ module ActiveModel # # Model.model_name must return a string with some convenience methods: # :human, :singular, and :plural. Check ActiveModel::Naming for more information. - # def test_model_naming assert model.class.respond_to?(:model_name), "The model should respond to model_name" model_name = model.class.model_name diff --git a/activemodel/lib/active_model/mass_assignment_security.rb b/activemodel/lib/active_model/mass_assignment_security.rb index 893fbf92c3..50951b28d9 100644 --- a/activemodel/lib/active_model/mass_assignment_security.rb +++ b/activemodel/lib/active_model/mass_assignment_security.rb @@ -56,8 +56,6 @@ module ActiveModel # # You can specify your own sanitizer object eg. MySanitizer.new. # See <tt>ActiveModel::MassAssignmentSecurity::LoggerSanitizer</tt> for example implementation. - # - # module ClassMethods # Attributes named in this macro are protected from mass-assignment # whenever attributes are sanitized before assignment. A role for the diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index f5ea285ccb..117c19c412 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -124,7 +124,6 @@ module ActiveModel # # This will call +custom_notification+, passing as arguments # the current object and :foo. - # def notify_observers(method, *extra_args) self.class.notify_observers(method, self, *extra_args) end @@ -192,7 +191,6 @@ module ActiveModel # If you're using an Observer in a Rails application with Active Record, be sure to # read about the necessary configuration in the documentation for # ActiveRecord::Observer. - # class Observer include Singleton extend ActiveSupport::DescendantsTracker diff --git a/activemodel/lib/active_model/serialization.rb b/activemodel/lib/active_model/serialization.rb index 6d8fd21814..5fabfb7219 100644 --- a/activemodel/lib/active_model/serialization.rb +++ b/activemodel/lib/active_model/serialization.rb @@ -115,7 +115,6 @@ module ActiveModel # @data[key] # end # end - # alias :read_attribute_for_serialization :send # Add associations specified via the <tt>:include</tt> option. diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 611e9ffd55..019d4b22cf 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -38,7 +38,6 @@ module ActiveModel # Note that <tt>ActiveModel::Validations</tt> automatically adds an +errors+ method # to your instances initialized with a new <tt>ActiveModel::Errors</tt> object, so # there is no need for you to do this manually. - # module Validations extend ActiveSupport::Concern @@ -222,7 +221,6 @@ module ActiveModel # @data[key] # end # end - # alias :read_attribute_for_validation :send protected diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index d94c4e3f4f..b6a1cfcf41 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -77,7 +77,6 @@ module ActiveModel # Or to all at the same time: # # validates :password, :presence => true, :confirmation => true, :if => :password_required? - # def validates(*attributes) defaults = attributes.extract_options!.dup validations = defaults.slice!(*_validates_default_keys) diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb index 2953126c3c..de1a271dde 100644 --- a/activemodel/lib/active_model/validator.rb +++ b/activemodel/lib/active_model/validator.rb @@ -94,7 +94,6 @@ module ActiveModel #:nodoc: # # This setup method is only called when used with validation macros or the # class level <tt>validates_with</tt> method. - # class Validator attr_reader :options @@ -102,7 +101,6 @@ module ActiveModel #:nodoc: # # PresenceValidator.kind # => :presence # UniquenessValidator.kind # => :uniqueness - # def self.kind @kind ||= name.split('::').last.underscore.sub(/_validator$/, '').to_sym unless anonymous? end |