aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/blog_post.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb
index ad31778..0470cf7 100644
--- a/app/models/blog_post.rb
+++ b/app/models/blog_post.rb
@@ -31,5 +31,22 @@ class BlogPost < ActiveRecord::Base
})
end
end
+
+ module ShareThis
+ DEFAULT_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+
+ class << self
+ def key
+ RefinerySetting.find_or_set(:share_this_key, BlogPost::ShareThis::DEFAULT_KEY, {
+ :scoping => :blog
+ })
+ end
+
+ def enabled?
+ key = BlogPost::ShareThis.key
+ key.present? and key != BlogPost::ShareThis::DEFAULT_KEY
+ end
+ end
+ end
end