For one action of user based on condition i want to render different
texts. So how do i achieve it through jquery?
A simple posting message application:
On post button i have a post method which has security checks and other
server side checks like :
if message_text.nil? or message_text.empty? or message_text.length > 140
respond_to do |format|
render :text=> “Please enter message upto 140
render :xml=>hash_map_for_xml.to_xml(:root => “mb”)
Normal post.js.erb is:
which works if all is ok but how do i render messages like these when
checks for them but i need these checks in case user enters it through
When i see in firebug i do get the response but it is not painted on
browser as it doesnt know where to do it.
I feel i’m missing out soemthing very simple. Please let me know how can
this be achieved?