title: Rails redirect_to inside custom class
body: <p>I have a custom Class in my Rails application, which validates a bunch of settings.</p>
  
  <p>The code:</p>
  
  <pre><code>class UserSettingObject &lt; RailsSettings::SettingObject
    validate do
      if !/^([0-9]|0[0-9]|1[0]):[0-5][0-9]$/.match(self.time)
        redirect_to settings_path, notice: 'Invalid time format'
      end
    end
  end
  </code></pre>
  
  <p>I check SO posts and found a similar problem (<a href="https://stackoverflow.com/questions/20453638/how-to-use-redirect-to-method-inside-of-custom-class">here</a>), the recommendation was <code>include ActionController::Redirecting</code> but it doesn't works, resulting in undefined method `config_accessor' error.</p>
  
  <p>How to use Rails redirects methods in a custom Class?</p>