app/controllers/forest_controller.rb
# Make sure to return after calling this method, e.g. `check_for_redirect! and return` to avoid double render errors
Make sure to return after calling this method, e.g.
Make sure to return after calling this method e . g .
def check_for_redirect!
    if redirect = Redirect.published.find_by_from_path("/#{page_path}")
      redirect_to redirect.to_path, params: { page_path: redirect.to_path }, status: 301
    end
  end
def check_for_redirect! if redirect = Redirect . published . find_by_from_path ( "/#{page_path}" ) redirect_to redirect . to_path , params : { page_path : redirect . to_path } , status : 301 end end
Make sure to return after calling this method, e.g.
Make sure to return after calling this method e . g .