开发者

Where should I put this code?

i have this snippet that i want to access from a controller or a model but i dont know what file to put it in

def cost_to_f(string)
 string.gsub(/[\$,]/, '').to_f
end

I tried application controller and application helper and no luck on either

开发者_StackOverflow中文版

any suggestions


Check out the discussion here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜