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.)
沒有留言:
張貼留言