Sha256: 3bf02416f11b3ba8cac878f4b5ed1a67fd8224f7c8ed9d8b7fbe37ebfa15b39e

Contents?: true

Size: 1.04 KB

Versions: 76

Compression:

Stored size: 1.04 KB

Contents

class RjsSpecController < ApplicationController
  set_view_path File.join(File.dirname(__FILE__), "..", "views")
  
  def replace_html
  end
  
  def insert_html
  end
  
  def replace
  end
  
  def hide_div
  end
  
  def hide_page_element
  end

  def replace_html_with_partial
  end

  def render_replace_html
    render :update do |page|
      page.replace_html 'mydiv', 'replacement text'
      page.replace_html 'myotherdiv', 'other replacement text'
    end
  end
  
  def render_replace_html_with_partial
    render :update do |page|
      page.replace_html 'mydiv', :partial => 'rjs_spec/replacement_partial'
    end
  end
  
  def render_insert_html
    render :update do |page|
      page.insert_html 'mydiv', 'replacement text'
    end
  end
  
  def render_replace
    render :update do |page|
      page.replace 'mydiv', 'replacement text'
    end
  end
  
  def render_hide_div
    render :update do |page|
      page.hide 'mydiv'
    end
  end
  
  def render_hide_page_element
    render :update do |page|
      page['mydiv'].hide
    end
  end
end

Version data entries

76 entries across 76 versions & 12 rubygems

Version Path
dchelimsky-rspec-rails-1.1.10 spec_resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.1 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.2 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.3 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.4 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.5 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.6 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11.7 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.11 spec_resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.12 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.6 spec_resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.7 spec_resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.8 spec_resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.9 spec_resources/controllers/rjs_spec_controller.rb
jcnetdev-rspec-rails-1.1.5 spec_resources/controllers/rjs_spec_controller.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec-rails/spec_resources/controllers/rjs_spec_controller.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec-rails/spec_resources/controllers/rjs_spec_controller.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec-rails/spec_resources/controllers/rjs_spec_controller.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec-rails/spec_resources/controllers/rjs_spec_controller.rb
jstorimer-deep-test-2.0.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb