On Tue, 3 Mar 2009 20:56:47 -0800 (PST) lunaclaire <szager...@gmail.com> wrote:
> I have a new service called redeyestats.com and the major function is > to send a daily email with a report (specifically a daily stats > listing for sports players that the user is following). This report > mirrors a page with the same info on the site. > > I want to keep things DRY, so it seemed like a good idea to create a > Reporter class that would compile each player report for both cases of > a) compiling the email and b) the site's page listing. Each player > report has links in it to the player's page, their team page, and to a > game page for their latest game. This sounds like a pretty straightforward use case for ActionMailer. You can add links to your email via actionmailer templates (via link_to). Then you can use the regular controller/view mechanism for your pages. So in summary 1) Store all of your player data in the model 2) Use an actionmailer template for the email 3) Use normal views for the pages SH -- Starr Horne My blog: http://starrhorne.com Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---