Rails 4 Error: ActiveRecord::RecordNotFound Couldn't find id=
问题 I'm fairly new to rails and into coding my first app. Just can't figure out how to target a user the current_user favorited (Three models: User, Tool, FavoriteUser). Controller (Tools) def index @favorites = current_user.favorites.order("created_at DESC") @userfavorites = current_user.userfavorites.order("created_at DESC") @tools = Tool.where(user_id: current_user).order("created_at DESC") @user = current_user.favorite_user # problematic! @cuser = current_user end Index View (Tools) %h2 My