module Upjs::Rails::InspectorAccessor
This adds two methods `#up` and `#up?` to all controllers, helpers and views, allowing the server to inspect the current request for Up.js-related concerns such as “is this a page fragment update?”.
Public Class Methods
included(base)
click to toggle source
# File lib/upjs/rails/inspector_accessor.rb, line 9 def self.included(base) base.helper_method :up, :up? end
Public Instance Methods
up()
click to toggle source
# File lib/upjs/rails/inspector_accessor.rb, line 13 def up @up_inspector ||= Inspector.new(self) end
up?()
click to toggle source
Returns whether the current request is an [page fragment update](upjs.io/up.replace) triggered by an Up.js frontend.
# File lib/upjs/rails/inspector_accessor.rb, line 22 delegate :up?, :to => :up