> Philip Hallstrom wrote: >>> What is the best way to include ad banners in rails? Do you include >>> them >>> in default layout? What is the ideal way if the ad has to change >>> each >>> time? >> >> My advice would be to not to do it. Tie Rails into an existing ad >> server. You really don't want to have to write your own ad server if >> you can avoid it. >> >> You may find this useful: >> http://pjkh.com/articles/2006/12/21/integrating-openads-with-rails >> >> I'm assuming you want to sell your own banners, otherwise integrating >> Google Adsense or similar is as simple as just dropping in the code. >> >> -philip > > Thank Philip. > > I was actually investigating both options, making my own or using > adsense.Can you please share some information (or links) on how to > integrate Adsense in my code?
Just drop the code into your views... If you want to make it a bit more configurable, setup a simple admin tool where your ad guy can paste the adsense code into a text_area and then include that. Add some keys so in your view you'd do something like: <%= AdsenseCode.find_by_key("homepage_bottom_right") %> Or similar. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---