app/controllers/concerns/error_methods.rb
def render_error( status_code )

      respond_to do |format|

        format.html { render( action: status_code, status: status_code )}
        format.all  { head( status_code )}

      end

      @error_sent = true

      true # return something so we can chain things

    end
# Returns an appropriate response for an HTTP status code. This should be used with any of the utility functions
# above.
Returns an appropriate response for an HTTP status code. This should be used with any of the utility functions
above.
Returns an appropriate response for an HTTP status code . This should be used with any of the utility functions above .
def render_error( status_code )
      respond_to do |format|
        format.html { render( action: status_code, status: status_code )}
        format.all  { head( status_code )}
      end
      @error_sent = true
      true 
    end
def render_error ( status_code ) respond_to do | format | format . html { render ( action : status_code , status : status_code ) } format . all { head ( status_code ) } end @error_sent = true true end
Returns an appropriate response for an HTTP status code.
Returns an appropriate response for an HTTP status code .
# return something so we can chain things
status_code