Hello, there is before_action:
before_action :set_film_session, only: [:show, :edit, :update, :destroy] His code
def set_film_session @film_session = FilmSession.find(params[:id]) end The problem is that if you write for example in the address bar - / film_sessions / 0, then the error Couldn't find FilmSession with 'id' = 0 appears. Everything that I am writing inside the show or in set_film_session (after the assignment line) does not work because of this I can’t make a check.