Jquery dialog


i had a index page with url as www.exa,com/users/jude.In that page i
want to submit a from which appears from popup dialog.The action of the
popup is going to send_message,Whenever i submits, via ajax the data
gets stored but not the page gets reflected.

My controller
def send_message
@message = current_user.messages.build(params[:message])
@message.receiver_id = @user.id
respond_to do |format|
if @message.save
format.html {redirect_to user_url(current_user)}


View file

-form_for Message.new,:url=>‘users_message_path’,:remote=>true do
=hidden_field_tag :id,@user.login
=f.text_area ‘content’,:rows => 10, :cols => 25
=f.submit ‘Send’

My js.erb

Problem is ajax is requestuing the action /users/send_message and not

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs