0
我想一些日志时出现错误:麻烦记录器
NoMethodError in RelationController#create
undefined method `attributes' for #<ActiveRecord::Relation:0x431e650>
这是我的控制器
def create
follow = User.find(params[:relation][:following_id])
current_user.following << follow
logger.debug "follow: #{follow.attributes.inspect}"
logger.debug "current_user: #{current_user.attributes.values}"
logger.debug "following: #{current_user.following.attributes.values}"
redirect_to follow
end
我能做些什么来解决这个问题,请大家帮帮我!
它工作呼叫
attributes
!谢谢 :) – mayoneQD 2014-10-27 07:26:55