2009年8月31日 星期一

在model 用url_for

Calling url_for from a Model in Rails
url_for’ method – according to its Rails source code documentation – is only available to controllers, views and mailers by default. (It’s actually a method found in the ActionController module so it’s no surprise that ActiveRecord classes don’t have access to this method.)

沒有留言: