1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix block alignment

This commit is contained in:
Vijay Dev 2011-04-23 03:06:06 +05:30
parent b22f39ec6f
commit e46e106c54

View file

@ -897,8 +897,9 @@ The macro-style class methods can also receive a block. Consider using this styl
class User < ActiveRecord::Base class User < ActiveRecord::Base
validates_presence_of :login, :email validates_presence_of :login, :email
before_create {|user| user.name = user.login.capitalize before_create do |user|
if user.name.blank?} user.name = user.login.capitalize if user.name.blank?
end
end end
</ruby> </ruby>