huacnlee / rails-settings-cached

Global settings for your Rails application.
Other
1.06k stars 202 forks source link

Administrate integration #82

Closed mgrachev closed 8 years ago

mgrachev commented 8 years ago

Hi. To integrate with gem administrate, it is necessary to Setting.new.value return nil, otherwise we get this error:

TypeError - no implicit conversion of nil into String:
  /usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
  /usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:318:in `parse'
  /usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:245:in `load'
  rails-settings-cached (0.5.2) lib/rails-settings/settings.rb:19:in `value'