Sha256: a539635b3a65f1a369827b1a7f169c7add6c4e559f2f0c5d6f1cea844d62988d

Contents?: true

Size: 295 Bytes

Versions: 35

Compression:

Stored size: 295 Bytes

Contents

module Enjoy::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

35 entries across 35 versions & 1 rubygems

Version Path
enjoy_cms-0.4.1 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0.5 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0.4 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0.3 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0.2 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0.1 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.4.0.beta3 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.7.4 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.7.3 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.7.2 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.7.1 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.7 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.6.2 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.6.1 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.6 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.5 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.4 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.3 app/controllers/concerns/enjoy/fancybox.rb
enjoy_cms-0.3.2.1 app/controllers/concerns/enjoy/fancybox.rb