Sha256: ccdc2bdd597c333905aed24416e2d5cdca2f924a51ca6e86a9c0a56d13e10590

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

# Exends Endpoints test component by adding a button to desctroy the session, after which pressing any other button should result in the notification about expired session.
class SessionExpiration < Endpoints
  action :destroy_session

  js_configure do |c|
    c.on_destroy_session = <<-JS
      function(){
        this.serverDestroySession();
      }
    JS
  end

  def configure(c)
    super
    c.bbar << :destroy_session
  end

  endpoint :server_destroy_session do |params,this|
    Netzke::Base.session.delete(:netzke_components)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
netzke-core-0.8.4 test/core_test_app/app/components/session_expiration.rb