blogit
blogit copied to clipboard
Move disqus_shortname fallback logic into accessor block
I was having an issue where I couldn't use the disqus_shortname
attribute I set in config/initializers/blogit.rb
this seemed to be because of the setter in lib/blogit/configuration.rb
, which seems to be concerned with the fallback and firing the warning if it's set without include_comments
being set to :disqus
.
That method sets an instance variable in Blogit::Configuration though, which didn't work with the default comments view. By moving that logic from the setter into the accessor block, all I had to do was set my :disqus_shortname
in the initializer and everything works automagically!