Module: Wiserespond::ActionController
- Defined in:
- lib/wiserespond.rb
Instance Method Summary collapse
Instance Method Details
#respond_with_content(options = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/wiserespond.rb', line 19 def respond_with_content(={}) .reverse_merge!( :flash => nil, :status => :success, :locals => nil ) self.setup_flash_for_content() respond_to do |format| format.html { render [:action] } format.js { render :template => 'wiserespond/content', :locals => } end end |
#respond_with_redirect(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/wiserespond.rb', line 5 def respond_with_redirect(={}) .reverse_merge!( :flash => nil, :status => :success ) self.setup_flash_for_redirect() respond_to do |format| format.html { redirect_to [:url] } format.js { render :template => 'wiserespond/redirect', :locals => } end end |