• blackst0ne's avatar
    [Rails5] Fix admin/application_settings_controller · ac1b5def
    blackst0ne authored
    The `RAILS5=1 rspec spec/controllers/admin/application_settings_controller_spec.rb`
    command throws the error:
    
    Failures:
    
      1) Admin::ApplicationSettingsController PUT #update falls back to defaults when settings are omitted
          Failure/Error: import_sources = params[:application_setting][:import_sources]
    
          NoMethodError:
            undefined method `[]' for nil:NilClass
          # ./app/controllers/admin/application_settings_controller.rb:62:in `application_setting_params'
    
    This commit fixes it.
    ac1b5def
application_settings_controller.rb 2.59 KB