Sha256: e9b03828fd293a4b34e2bfc07e29412ea499fd2f0bb4c1dd85534c2351faeaa6

Contents?: true

Size: 674 Bytes

Versions: 30

Compression:

Stored size: 674 Bytes

Contents

class HomeController < ApplicationController

  before_filter :toggle_ajaxify

  def index
    sleep 0.5
  end

  def page1
    sleep 0.5
  end

  def page2
    sleep 0.5
    if request.post?
      flash.now[:notice] = "Form submitted (#{params[:input1]}, #{params[:input2]}, #{params[:check_me]})"
    end
  end

  def page3
    flash[:notice] = 'Redirected to Page 1'
    redirect_to '/home/page1'
  end


  private

  def toggle_ajaxify
    session[:ajaxify] = true if params[:ajaxify_on]
    session[:ajaxify] = false if params[:ajaxify_off]
    session[:push_state_enabled] = (params[:push_state_enabled] != 'false') if params[:push_state_enabled].present? 
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
ajaxify_rails-0.9.7 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.6 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.5 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.4 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.3 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.2 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.1 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.9.0 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.9 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.8 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.7 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.6 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.5 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.4 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.3 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.2 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.1 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.8.0 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.7.8 spec/ajaxify_test/app/controllers/home_controller.rb
ajaxify_rails-0.7.7 spec/ajaxify_test/app/controllers/home_controller.rb