6.3 - Find a destination - Associations I


My code

class DestinationsController < ApplicationController

def show
@destination = @destinations.find(params[:id])


error ocure: undefined method `find’ for nil:NilClass


doesn’t seem to exist. What about,


The class is defined in the models folder.

Show a destination


Thanks! I thought it takes variable from destinations_controller:
@destinations = @tag.destinations


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.