Permalink
Browse files

tweak formatting for rails_extensions

  • Loading branch information...
1 parent e0dedcd commit 60d82505992cee77777378f6ff6abe3bafe9aec3 @UnderpantsGnome committed Apr 15, 2009
Showing with 15 additions and 11 deletions.
  1. +15 −11 lib/rails_extensions.rb
View
26 lib/rails_extensions.rb
@@ -2,22 +2,26 @@ module ActiveRecord
class Base
class << self
def boolean_field(*args)
- args.each {|prop| class_eval(<<-EODEF
- def #{prop}?
- #{prop} === true || #{prop} === 1
- end
+ args.each {|prop|
+ class_eval(<<-EODEF
+ def #{prop}?
+ #{prop} === true || #{prop} === 1
+ end
EODEF
- )}
+ )
+ }
end
def nil_if_blank(*args)
- args.each {|prop| class_eval(<<-EODEF
- def #{prop}
- val = super
- nil if val.blank?
- end
+ args.each {|prop|
+ class_eval(<<-EODEF
+ def #{prop}
+ val = super
+ nil if val.blank?
+ end
EODEF
- )}
+ )
+ }
end
end
end

0 comments on commit 60d8250

Please sign in to comment.