Colin Law wrote: > 2009/9/30 Smit Shah <[email protected]>: >>> What is the problem that is preventing you from storing it in the db? >> I have a model named as Data in which I am storing that data. >> >> @data = Data.new >> @data.title = @rss.entries.title >> >> But when I try to store in db it shows me like " allocator undefined for >> Data". >> Any idea??? > > Data is a reserved word in rails (see > http://wiki.rubyonrails.org/rails/pages/ReservedWords). I suggest > using a different name for the model. > > Colin
Hey thanks dude... Its work But now I am suffering from another problem. It stores in db but only the first entry of XML file. I have written that code in for loop. My code is as follow: @rss = FeedNormalizer::FeedNormalizer.parse open(feed_url) @rss = @rss.entries.paginate :page => params[:page], :per_page => 5 if [email protected]? @abc = Abc.new for rss in @rss.entries if [email protected]? @abc.title = rss.title @abc.url = rss.url end end @abc.save if [email protected]? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---

