我正在尝试使用一个jQuery脚本,它将在我的Drupal 7首页上启用一个“滑块”或“幻灯片”。jQuery插件(称为FlexSlider)的说明要求将以下项插入到我想要使用该插件的页面的标题中。
<!-- Place somewhere in the <head> of your document -->
<link rel="stylesheet" href="flexslider.css" type="text/css">
<script src="https://ajax.googlea
Arg,我是一个RoR新手,感觉到了我的方式,我在这里尝试过的每一个合理的组合都失败了--非常感谢:
所以我有物品和状态。项具有由status_id引用的状态:
class Status < ActiveRecord::Base
has_many :items
end
Class Item < ActiveRecord::Base
belongs_to :status
end
状态可以是“出售”、“删除”、“隐藏”、“出售”等。
在我的网站首页上,我一直在随机显示最后30个添加的项目:
<% latest_items = Items.last(30).shuffle