I'm having the darnedest time understanding something I'm sure is very simple (at least was under other web dev platforms where I would do a href...C:\windows\apps\home.html). I'm trying to set up a link to my home page
I have an application controller:
And a home controller:
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection for details
# Scrub sensitive parameters from your log
# filter_parameter_logging :password
and a main.html.erb:
class HomeController < ApplicationController
I would like home to display the contents of my main.html.erb file. (or should it be application.html.erb?). To further confuse me, my home folder, under /apps/views/home has an index.html.erb file.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<%= stylesheet_link_tag 'style' %>
<li><%= link_to 'Movies', movies_path %></li> #this link works fine
I must be mixing up my views (have I somehow created too many?) and perhaps not defining things properly in routes.rb. Hopefully haven't confused you all as much as I have myself. Any help most appreciated.