Module: WCC::Contentful::App::PreviewPassword
- Included in:
- ContactFormController, PagesController
- Defined in:
- app/models/concerns/wcc/contentful/app/preview_password.rb
Instance Method Summary collapse
Instance Method Details
#preview? ⇒ Boolean
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/models/concerns/wcc/contentful/app/preview_password.rb', line 4 def preview? # check ApplicationController for a :preview? method return super if defined?(super) @preview ||= if preview_password.present? params[:preview]&.chomp == preview_password.chomp else false end end |
#preview_password ⇒ Object
16 17 18 |
# File 'app/models/concerns/wcc/contentful/app/preview_password.rb', line 16 def preview_password WCC::Contentful::App.configuration.preview_password end |