Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove whitespace

  • Loading branch information...
commit f41ab932fc7af17e71556f03f0ff3f02a5d87497 1 parent e10168f
Saimon Moore authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 lib/sequel/plugins/polymorphic.rb
12 lib/sequel/plugins/polymorphic.rb
@@ -37,9 +37,9 @@ def many_to_one(*args, &block)
37 37 end
38 38 end)
39 39 )
40   -
  40 +
41 41 private
42   -
  42 +
43 43 def _#{able}=(#{able})
44 44 self[:#{able}_id] = (#{able}.pk if #{able})
45 45 self[:#{able}_type] = (#{able}.class.name if #{able})
@@ -49,7 +49,7 @@ def _#{able}=(#{able})
49 49 associate(:many_to_one, *args, &block)
50 50 end
51 51 end
52   -
  52 +
53 53 alias :belongs_to :many_to_one
54 54
55 55 def one_to_many(*args, &block)
@@ -63,7 +63,7 @@ def one_to_many(*args, &block)
63 63
64 64 method_definitions = %{
65 65 private
66   -
  66 +
67 67 def _add_#{many_class}(#{many_class})
68 68 #{many_class}.#{able}_id = pk
69 69 #{many_class}.#{able}_type = '#{self}'
@@ -83,9 +83,9 @@ def _remove_all_#{many_of_class}
83 83 associate(:one_to_many, *args, &block)
84 84 end
85 85 end
86   -
  86 +
87 87 alias :has_many :one_to_many
88   -
  88 +
89 89 #example: many_to_many :tags, :through => :taggings, :as => :taggable
90 90 def many_to_many(*args, &block)
91 91 many_to_class, options = *args # => :tags, :through => :taggings, :as => :taggable

0 comments on commit f41ab93

Please sign in to comment.
Something went wrong with that request. Please try again.