Sha256: 74a84ed228f19e06399d84991cc517f35ee06865e9fd0176952e3cbf392c1345

Contents?: true

Size: 297 Bytes

Versions: 13

Compression:

Stored size: 297 Bytes

Contents

module Hancock::Fancybox
  extend ActiveSupport::Concern
  included do
    helper_method :request_for_fancybox?
  end

  def render_for_fancybox
    render layout: false if request_for_fancybox?
  end

  def request_for_fancybox?
    request.xhr? and params[:load_by_fancybox] == "true"
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hancock_cms-2.0.1.3 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.2.3 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-2.0.1.2 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-2.0.1.1 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.2.2 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.1 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-2.0.0.2 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.0.4 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.0.3 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-2.0.0.1 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.0.2 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-2.0.0 app/controllers/concerns/hancock/fancybox.rb
hancock_cms-1.0.0 app/controllers/concerns/hancock/fancybox.rb