Setup & Authentication

I’m getting ActiveModel::ForbiddenAttributesError when I add user_params to the UsersController, with following source:

  def sanitize_for_mass_assignment(attributes)
    if attributes.respond_to?(:permitted?)
      raise ActiveModel::ForbiddenAttributesError if !attributes.permitted?
      attributes.to_h
    else
      attributes

Tried to find the author’s code on Github but nothing…I’ve followed exactly step by step, but stymied now. My Rails is a bit rusty, but this is rather annoying–any chance you can post sample code somewhere as a reference?