Permalink
Browse files

Remove whitespace

  • Loading branch information...
saimonmoore committed Nov 26, 2010
1 parent e10168f commit f41ab932fc7af17e71556f03f0ff3f02a5d87497
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/sequel/plugins/polymorphic.rb
@@ -37,9 +37,9 @@ def many_to_one(*args, &block)
end
end)
)
-
+
private
-
+
def _#{able}=(#{able})
self[:#{able}_id] = (#{able}.pk if #{able})
self[:#{able}_type] = (#{able}.class.name if #{able})
@@ -49,7 +49,7 @@ def _#{able}=(#{able})
associate(:many_to_one, *args, &block)
end
end
-
+
alias :belongs_to :many_to_one
def one_to_many(*args, &block)
@@ -63,7 +63,7 @@ def one_to_many(*args, &block)
method_definitions = %{
private
-
+
def _add_#{many_class}(#{many_class})
#{many_class}.#{able}_id = pk
#{many_class}.#{able}_type = '#{self}'
@@ -83,9 +83,9 @@ def _remove_all_#{many_of_class}
associate(:one_to_many, *args, &block)
end
end
-
+
alias :has_many :one_to_many
-
+
#example: many_to_many :tags, :through => :taggings, :as => :taggable
def many_to_many(*args, &block)
many_to_class, options = *args # => :tags, :through => :taggings, :as => :taggable

0 comments on commit f41ab93

Please sign in to comment.