1
实际上,我使用restful-authentication,但是ai需要从MODEL(无控制器)不同的用户调用方法logged_in。如何在模型的rails中调用方法logged_in?
你可以帮我...
例如:
modelx.rb
def price
if logged_in?
@product.price = current_user.prices
else
@product.price = 0
end
end