-
Notifications
You must be signed in to change notification settings - Fork 32
String
Vinicius Stock edited this page Feb 19, 2019
·
1 revision
Sail.set(:my_string_setting, "my specific string")
Sail.get(:my_string_setting)
=> "my specific string"
Sail.get(:my_string_setting) do |setting_value|
puts setting_value
end
=> "my specific string"
String settings are the simplest. They are just configurable strings that can be used anywhere in the code.
class Comment < ApplicationRecord
.
.
.
def extract_author
self.text.scan(Sail.get(:author_string_regex))
end
end