开发者

Add a method to array object

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜