Module: RailsActionDeprecation::Controller::ClassMethods
- Defined in:
- lib/rails_action_deprecation/controller.rb
Instance Method Summary collapse
- #deprecate_endpoint(datetime, only: nil, link: nil) ⇒ Object
- #sunset_endpoint(datetime, only: nil, link: nil) ⇒ Object
Instance Method Details
#deprecate_endpoint(datetime, only: nil, link: nil) ⇒ Object
6 7 8 9 10 |
# File 'lib/rails_action_deprecation/controller.rb', line 6 def deprecate_endpoint(datetime, only: nil, link: nil) # Deliver the (draft) Deprecation HTTP header with the response # https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-deprecation-header deprecation 'Deprecation', datetime, only: only, link: link end |
#sunset_endpoint(datetime, only: nil, link: nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/rails_action_deprecation/controller.rb', line 12 def sunset_endpoint(datetime, only: nil, link: nil) # Deliver the Sunset HTTP header with the response # https://datatracker.ietf.org/doc/html/rfc8594 deprecation 'Sunset', datetime, only: only, link: link end |