ruby on rails - ActionController::UnknownFormat when sending plain text -


i'm riding rail4 , trying send plain text down request:

def get_text   respond_to |format|     format.text { render :text => "huh" }   end end 

but end actioncontroller::unknownformat have frustrating discovered rails' funny way of saying 406 not acceptable.

what going on here?

it expecting format json , xml have given text not format.

def get_text   render :text => "huh" end 

you can send text this.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -