Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def list
- #code.....
- reponse_type
- end
- private
- # Pick xhr or rhtml
- def reponse_type
- respond_to do |format|
- format.js {} # show <action>.js
- format.xml {} # show <action>.rxml
- format.html {render :text => (request.xhr?).to_s} # show <action>.rhtml
- # allways renders html
- end
- end
Add Comment
Please, Sign In to add comment