I have this in my controller:
@statics = [{'home' => 'about'},
{'home' => 'termsandconditions'},
{'home' => 'information'},
{'news' => 'archives'}]
and in my view:
@statics.each do |controller, action|
xml.loc url_for(:only_path => false, :controller => controller, :action => action)
xml.lastmod w3c_date(Time.now)
xml.changefreq "weekly"
xml.priority 0.8
end
the URLs aren't what I would expect, e.g.
http://localhost:3000/homeinformation
instead of
http://localhost:3000/information
However, I just did this manually, I get the right URL:
url_for(:only_path => false, :controller => 'brownies', :action => 'index') #works!
What am I missing here?