title: How can i add a method to an existing class in Rails 5?
body: <p>Sorry for my bad english. I have to add a method in Date class in Rails because i want to use my translated day names.
  So, i tried: </p>
  
  <pre><code>class Date
    def date_of_next(day)
      date  = Date.parse(day)
      delta = date &gt; Date.today ? 0 : 7
      date + delta
    end
  end
  </code></pre>
  
  <p>in config/initializers/date_of_next.rb but when i call Date.date_of_next(day) in my controller i get "no method in Date".
  How can i do that? And where should i put the file?</p>