Ruby on Rails
Tuesday, March 4, 2014
On Tuesday, March 4, 2014 12:04:46 PM UTC-5, Steven Cahill wrote:
Thanks Rickon the actual categories page the categories are listed in category_id order correctly, I have the following code in my controller# GET /categories# GET /categories.jsondef index@categories = Category.order('id asc')endThe only problem is the navigation list that I have put into the application layout page seems to have a mind of its own, here is the code for
If, by "application layout page" you mean app/views/catagories/index.html.erb, use @categories.each not Category.all.each.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/97d02951-07b2-4e8c-b538-3fbfe86c7ffa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment