My question is: How do I loop thru each user and each membership? My idea was to build 2 loops, but its not working =/ (Unknown method 'each' for users?)
ruby
xml.instruct! :xml, version:"1.0"
xml.rss version:"2.0"do
xml.channel do
xml.title "..."
xml.description "..."
xml.link users_url
@users.each do |user|
user.memberships.each do |membership|
xml.item do
xml.title membership.name
xml.pubDate membership.subscribed_at.to_s(:rfc822)
endendendendend
time rake db:migrate with normal macbook pro hdd: 2.x seconds
time rake db:migrate with samsung 840 pro ssd: 1.x seconds
I also feel the difference :)
+1
I find out a easy solution. Just edit your routes.rb file like this:
But there is another problem. I got 2 different display styles (grid and list).
When I try something like this:
I get the "pretty url" plus "?display=grid" =/
Hi,
does anyone have a good solution to modify the will_paginate paging urls?
old:
.../products?page=2
new:
.../products/page/2/
Hi,
I got 2 models, "User" and "Memberships". Each user has multiple memberships (has_many), and each membership belongs_to an user.
My question is: How do I loop thru each user and each membership? My idea was to build 2 loops, but its not working =/ (Unknown method 'each' for users?)