-
Notifications
You must be signed in to change notification settings - Fork 32
Uri
Vinicius Stock edited this page Feb 19, 2019
·
2 revisions
Sail.set(:my_uri_setting, "https://github.com")
Sail.set(:my_uri_setting, URI("https://github.com"))
Sail.get(:my_uri_setting)
=> #<URI::HTTPS https://github.com>
Sail.get(:my_uri_setting) do |setting_value|
puts setting_value
end
=> #<URI::HTTPS https://github.com>
Uri settings return a URI object for the given string.
class Profile < ApplicationRecord
.
.
.
def image_url
Sail.get(:images_base_url)
end
end