I believe that it should be fair to state what I think I know so far and what I have done:
1) I created the application and completed my first db migration; I know that I have test and production databases. Dev db has a table called "fault."
2) I made a scaffold that created the necessary files.
3) The basic index / update / destroy methods are configured, and I can view the pages.
4) From what I collect, the ActiveRecord class "Wine" automatically inherits properties from the database? Each column is a property, and each row in the wine table represents a potentially created object that is called from the wine_controller script file.
Now the problem is that I want to create a common layout that all controllers use. The only thing that will change will be the page title, possibly some <link> tags in the title, <body> attributes (most likely javascript onload events) and everything that is inside the <body> tag.
I find myself searching for functions that will do what I want (for example, "favicon_link_tag", "stylesheet_link_tag" and "auto_discovery_link_tag" ...), but I cannot find a suitable place to run them! I know this has something to do with my lack of understanding of how things are done / inherited. For example, if I were to declare @pageTitle in application_controller.rb and use @pageTitle in ApplicationHelper, this would not work. Or even using "stylesheet_link_tag" in application_controller.rb throws an error. I just don't get anything.
How does each thing relate to another in terms of chronological performance, scope, etc.?
source
share