Ruby on Rails Monday, February 17, 2014

On 17 February 2014 21:38, Luca Fuhl <lists@ruby-forum.com> wrote:
> Hay guys, im pretty new to rails and im working on my first little
> project (well it's a page for a friend so ˆˆ) and until now i got no
> problems. But no i got my first little problem and not sure how to solve
> it right :s.
>
> I have a database with a table called game_pairs where i want to store
> game parings of the bundesliga (soccer league in germany). I want to
> store them only one time on the setup of the page. So i thought i create
> a little helper method in an extra file in lib/assets called
> get_game_data.rb. I already got the data from a website, so that works.
> But now i don't know how to store this data into the database since i
> can't use the database model from rails. How do i save them into the
> database?

Why can't you use the database model from rails? That is derive the
model from ActiveRecord as normal.

Can I first check that you have worked right through a good tutorial
such as railstutorial.org which is free to use online. That will show
you the basics of rails.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLt%2B5jFGxL2PUOODNq7u5OU38y9z6%3DDoyReVyDDyTH8X1g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment