I think the most useful concept I learned this week was the connection between Controller and View, specifically with regards to the index and show actions.

With the index action, we are always dealing with all entries that have been made, so the variable is plural. For instance, we would declare under the product controller:

products_controller.rb
def index
    @products = Product.all
end

In turn, when the index action is called, it renders the views/XXX/index.html.erb page. In this page, in order to retreive information for the products, we would have to call the @products variable:

views/products/index.html.erb
<% @products.each do |product| %>
    <%= image_tag (product.image.thumb.url) %>

Similarly, under the show action, we are dealing with information for a specific occurance of a product, and thus the word "product" should be singular.

products_controller.rb
def show
    @product = Product.find(params[:id])
end

And in the views/products/show.html.erb file, we call the singular @product variable which has already been defined in the controller:

views/products/show.html.erb
<%= image_tag @product.image.medium.url, :class => "style_image" %>

This distinction really helped me to code better in the view files to make sure I'm getting the correct variables.