开发者

more methods for before_validation

Is possible set 2 methods on before_validation in a model?

before_validation :elaborate
before_validation :download_re开发者_JAVA百科mote_data, :if => :data_url_provided? 


Yes, your code is fine. Just have in mind that elaborate method is going to be executed first (since it's registered before the download_remote_data method).


That is certainly valid. You can add as many before_validation calls as you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜