adds Settings
This commit is contained in:
7
app/models/setting.rb
Normal file
7
app/models/setting.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Setting < ActiveRecord::Base
|
||||
default_scope { order(key: :desc) }
|
||||
|
||||
def self.value_for(key)
|
||||
where(key: key).pluck(:value).first
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user