-
Notifications
You must be signed in to change notification settings - Fork 32
Array
Vinicius Stock edited this page Feb 19, 2019
·
1 revision
Sail.set(:my_array_setting, ["Mark", "John"])
Sail.set(:my_array_setting, "Mark;John")
Sail.get(:my_array_setting)
=> ["Mark", "John"]
Sail.get(:my_array_setting) do |setting_value|
puts setting_value
end
=> ["Mark", "John"]
Array settings can be configured to be used for defining specific lists that may need to be changed live.
class Question < ApplicationRecord
.
.
.
def assign_question
User.where(name: Sail.get(:mentors)) do |user|
user.assign_question(self)
end
end
end