Revision 9d43fc71
Added by Michael Moll almost 6 years ago
app/controllers/settings_controller.rb | ||
---|---|---|
# This can happen in development when removing a plugin
|
||
rescue_from ActiveRecord::SubclassNotFound do |e|
|
||
type = (e.to_s =~ /\'(Setting::.*)\'\./) ? Regexp.last_match(1) : 'STI-Type'
|
||
render :plain => (e.to_s+"<br><b>run Setting.where(:category=>'#{type}').delete_all to recover.</b>").html_safe, :status=> :internal_server_error
|
||
render :plain => (e.to_s + "<br><b>run Setting.where(:category=>'#{type}').delete_all to recover.</b>").html_safe, :status => :internal_server_error
|
||
end
|
||
|
||
def index
|
Also available in: Unified diff
Fixes #19789 - fix Layout/SpaceAroundOperators cop