lib/ballast/concerns/ajax.rb in ballast-1.5.0 vs lib/ballast/concerns/ajax.rb in ballast-1.5.1

- old
+ new

@@ -12,10 +12,10 @@ # Checks if the current request is AJAX. # # @return [Boolean] `true` if the request is AJAX, `false` otherwise. def is_ajax? - (request.respond_to?(:xhr?) && request.xhr?) || params[:xhr].to_boolean ? true : false + ((request.respond_to?(:xhr?) && request.xhr?) || params[:xhr].to_boolean) ? true : false end # Prepares an AJAX response. # # @param status [Symbol|Fixnum] The HTTP status of the response. \ No newline at end of file