Sha256: 11a9a5f7c44cd33eac605d7edb436bf341b25d67464904919bae92e0cf13abbc

Contents?: true

Size: 835 Bytes

Versions: 4

Compression:

Stored size: 835 Bytes

Contents

class PagesController < ApplicationController
  respond_to :html, :js, :only => :about
  ajax_respond :section_id => "page", :render => "_warningpage", :except => ["welcome","warnings"] # does nothing - tests that :except option works
  def readme
    @readme = IO.read(File.expand_path("../../../../../README.md",__FILE__))
    respond_to do |format|
      format.html
      ajax_respond format, :section_id => "global", :render => {:file => "pages/readme", :layout => "ajax"}
    end
  end

  def about
  end

  def welcome
    respond_to do |format|
      format.html
      ajax_respond format, :section_id => "global", :render => { :layout => "ajax" }
    end
  end

  def warnings
    respond_to do |format|
      format.html
      ajax_respond format, :section_id => "disable", :render => { :layout => "ajax" }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ajax_pagination-0.6.5 spec/rails_app/app/controllers/pages_controller.rb
ajax_pagination-0.6.4 spec/rails_app/app/controllers/pages_controller.rb
ajax_pagination-0.6.3 spec/rails_app/app/controllers/pages_controller.rb
ajax_pagination-0.6.2 spec/rails_app/app/controllers/pages_controller.rb