Skip to content

Commit

Permalink
Restore accidentally removed documentation for `Tanshuku::Configurati…
Browse files Browse the repository at this point in the history
…on.default_url_options`

They were unintentionally removed in commit ca93377.
  • Loading branch information
kg8m committed Dec 28, 2024
1 parent 4271ff0 commit e2cb2ee
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/tanshuku/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ def self.call(exception:, original_url:)
end

include ActiveModel::Attributes

# @!attribute [rw] default_url_options
# Default URL options for Rails’ +url_for+. Defaults to +{}+.
#
# @return [Hash]
# @return [void] If you set an invalid object.
#
# @note
# The example below means that the configured host and protocol are used. Shortened URLs will be like
# +https://example.com/t/abcdefghij0123456789+.
#
# @example
# # config/initializers/tanshuku.rb
# Tanshuku.configure do |config|
# config.default_url_options = { host: "example.com", protocol: :https }
# end
attribute :default_url_options, default: {}

# @!attribute [rw] max_url_length
Expand Down

0 comments on commit e2cb2ee

Please sign in to comment.