Module: SinatraHelpers
- Defined in:
- lib/sinatra_helpers.rb,
lib/sinatra_helpers/cache.rb,
lib/sinatra_helpers/version.rb,
lib/sinatra_helpers/erb/tags.rb,
lib/sinatra_helpers/erb/forms.rb,
lib/sinatra_helpers/erb/links.rb,
lib/sinatra_helpers/erb/proper.rb,
lib/sinatra_helpers/erb/partials.rb,
lib/sinatra_helpers/active_record.rb,
lib/sinatra_helpers/erb/analytics.rb,
lib/sinatra_helpers/generator/app.rb,
lib/sinatra_helpers/environment_tests.rb,
lib/sinatra_helpers/generator/template.rb
Defined Under Namespace
Modules: ActiveRecord, Cache, EnvironmentTests, Erb, Generator, Version
Class Method Summary collapse
Class Method Details
.page_cache?(app) ⇒ Boolean
9 10 11 12 13 14 15 16 17 |
# File 'lib/sinatra_helpers.rb', line 9 def page_cache?(app) if defined?(Rails) Rails.configuration.action_controller.perform_caching elsif app.respond_to?(:environment) app.environment.to_s == 'production' else false end end |