Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Updating Database with External Info that Changes

rails database

  • Please log in to reply
1 reply to this topic

#1 eto

eto

    Passenger

  • Members
  • 2 posts

Posted 18 December 2013 - 11:23 PM

Hello!

 

I have a stupid question, as I'm a total n00b to Rails and programming in general.

 

Anyway!

 

I'm making a web app that allows users to "check off" and also review restaurants in my database. I get these restaurants from an external source that is constantly updated.

 

I would ideally like my database to stay very up-to-date by pulling new objects from this external source.

 

Any advice for doing this?

 

Would I just periodically rake db:seed and implement some sort of checks to make sure there's no duplicates? Any tutorials on how to do that? I tried Google to no avail...

 

Or is there another way?

 

Thank you! :)


  • eto likes this

#2 Bharat Soni

Bharat Soni

    Dispatcher

  • Members
  • 54 posts
  • LocationAhmedabad

Posted 19 December 2013 - 04:57 AM   Best Answer

You can set a "cron job" for that. And set time according to for updating the database.  :rolleyes:


  • eto likes this

Fun with Ruby on Rails






Also tagged with one or more of these keywords: rails, database

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users