[Rails] Newbie Model Question
I'm building a shop in rails as a learning excercise. I've got to the last part when I'm sending out e-mail order confirmations. The e-mails contain a list of each line item the customer ordered, I also want to display the catgory name the customer ordered from. The database is setup: Category > Product > Line_item. So I want to navigate back from line_item > product > category so i can display the category name in the email however im not sure how I tell it to find the category name from the item. Be greatful for anyhelp. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Simple Routes Question
I currently have list of different articles (in this case health articles) at the moment their show URL format is: http://localhost:3000/conditions/1 but I would like a more descriptive URL than this, so I would like it to read: http://localhost:3000/conditions/cancer This is the title of the article which is currnetly stored in a row in the database. I'm new to all this so thought i'd ask for some pointers :) Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] European Date Format (newbie!)
Rails 2.0 Hi there, There are a few topics on here that relate to my problem but none are helping as i'm new to this and there are lots of confusing posts on google. I need to chage the way dates are input and displayed in my app. This is for a european app so the dates need to work as DD/MM/ not the America way. Now I don't mind keeping the datbase in the orginal Date format as I won't be accessing it directly however I guess I need to wrtite something in my model to change the way the dates are done? Anybody able to help? Many thanks. Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---