开发者

Add a method to array object

开发者 https://www.devze.com 2022-12-31 17:27 出处:网络
I\'ve found this post: Array#add_condition But i didn\'t understand to how implement it in my rails project

I've found this post:

Array#add_condition But i didn't understand to how implement it in my rails project

How can i do i开发者_运维技巧t?

thanks


Just create add_condition.rb file, paste code snippet from your link and save it in lib directory in your Rails app.


Copy and paste that code into a file. There — the method is added to Array. The lib directory would be a good place for it.

0

精彩评论

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