Displaying 1 result from an estimated 1 matches for "users_ip".
Did you mean:
user_ip
2006 Jan 19
4
Relationships... not the personal kind!
...eys of the posting and user. In
the comments table I have the appropriate columns (posting_id,
user_id).
Here''s what I have in the comment_controller for creating a new comment:
def new
@comment = Comment.new
end
def create
@comment = Comment.new(params[:comment])
@comment.users_ip = request.remote_ip
@comment.users = session[:user] <--- Doesn''t work... stumped
@comment.posting = @posting <---- Where I''m stumped again
if @comment.save
flash[:notice] = ''Comment was successfully created.''
redirect_to :action =&g...