Comfortable Mexican Sofa - Accessing cms content from the app

362 Views Asked by At

I'm having trouble accessing the cms content from the app.

This is the rails code, from where I wanna access the content of the cms.

# GET /songs
# GET /songs.json
def index
  @songs = Song.all
  render cms_page: 'songs/index', cms_site: (Rails.env.development? ? 'songs-en' : nil)
end

But I always get the following:

enter image description here

Is there something I'm missing there?

1

There are 1 best solutions below

0
Hendry I. On

My goodness, seems like not only I must put / at the beginning of the songs/index, but I also have to put another / at the end of it. So the final form (that works for me) looks like /songs/index/.

Thanks everybody. Many thanks to @CharlieEgan

Hendry I.