Module: VersionCake::ControllerAdditions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/versioncake/controller_additions.rb
Instance Method Summary collapse
-
#is_deprecated_version? ⇒ Boolean
A boolean check to determine if the version requested is deprecated.
-
#is_latest_version? ⇒ Boolean
A boolean check to determine if the latest version is requested.
-
#request_version ⇒ Object
The explicit version requested by a client, this may not be the rendered version and may also be nil.
Instance Method Details
#is_deprecated_version? ⇒ Boolean
A boolean check to determine if the version requested is deprecated.
29 30 31 |
# File 'lib/versioncake/controller_additions.rb', line 29 def is_deprecated_version? version_context.result == :deprecated end |
#is_latest_version? ⇒ Boolean
A boolean check to determine if the latest version is requested.
24 25 26 |
# File 'lib/versioncake/controller_additions.rb', line 24 def is_latest_version? version_context.is_latest_version? end |
#request_version ⇒ Object
The explicit version requested by a client, this may not be the rendered version and may also be nil.
19 20 21 |
# File 'lib/versioncake/controller_additions.rb', line 19 def request_version @request_version ||= version_context.version end |