Basically, I have a method that I want to use upon multiple controllers.
def has_been_updated_today
# Code that checks if a Model has been updated...
end
In this blog the author stated that it should be placed in the /modules
directory, and then you can simply include
in any file.
The problem I have with this is that everything related to my app is in the app directory. Everything about configuring intial set up is in the config
just like everything about the database is in the db
.
Furthermore, I am still get re-familiar with Rails, but how does include filename
know where to get filename.rb from? How does it know it's in lib
when I never stated it?