Write a program to show the functionality of request.xhr in Ruby on Rails.

Write a program to show the functionality of request.xhr in Ruby on Rails?



-Request from the request.xhr displays the controller that manages and creates the new AJAX that is being handled by the new controller.

-The Boolean values that are retured should generate only TRUE or FALSE. These values are used to be inserted for this purpose.

-The request.xhr is being shown in a program shown below as:

def create
return unless request.xhr?
@imageable = find_imageable
@image = @imageable.images.build(params[:imageable])
@image.save
render :layout => false
end
Post your comment