When I run ruby on rails program, get the error message:undefined method `action' for StaticPagesController:Class
application_controller.rb
require_relative '../models/pet'
class ApplicationController < Sinatra::Base
get '/' do
#home
erb :index
end
get '/questions' do
erb :questions
end
post '/results' do
@dog=get_results(params)
erb :results
end
end
Here is my static_pages_controller.rb
class StaticPagesController < ApplicationController
def index
# Renders static_pages/swalton2html.erb by default.
end
def questions
# Renders static_pages/swalton2html.erb by default.
end
Aucun commentaire:
Enregistrer un commentaire