1

I use HighVoltage for static pages. I have:

get "/filter/:city" => 'pages#show', as: :page, format: false
root to: 'pages#show', id: 'home', :defaults => { :city => "Bolu" }

in the routes.rb.

I have a PagesController:

class PagesController < ApplicationController
  include HighVoltage::StaticPage
end

Now, I have a home.html.erb for the homepage. I wanted define some things in the controller. For example, I want:

@events = Event.where(name: "sports")

so I tried to write

def show
end

in the PagesController but is gives "No such page: home". I'm a bit lost here. Any suggestion?

DR_
  • 174
  • 1
  • 2
  • 14

0 Answers0