简体   繁体   English

舒适的墨西哥沙发-从应用程序访问cms内容

[英]Comfortable Mexican Sofa - Accessing cms content from the app

I'm having trouble accessing the cms content from the app. 我无法从应用程序访问cms内容。

This is the rails code, from where I wanna access the content of the cms. 这是Rails代码,我想从这里访问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: 但是我总是得到以下信息:

在此处输入图片说明

Is there something I'm missing there? 我在那里想念什么吗?

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/ . 因此,最终形式(对我有用)看起来像/ songs / index /

Thanks everybody. 谢谢大家。 Many thanks to @CharlieEgan 非常感谢@CharlieEgan

Hendry I. 亨德利一世

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM