Backend support for game

37 views
Skip to first unread message

John R_

unread,
Sep 18, 2014, 2:50:59 PM9/18/14
to rubyonra...@googlegroups.com
Hey All:

I just started learning Ruby & Rails to use with Heroku. I understand
how Ruby works, and I like it a lot. I'm kind of stuck on how to
implement my backend api for my game however. For instance, I have a
"Game" model that is attached. If I wanted to call the Game controller
to check for any rows that existed for specific column value(s), how
would I do so?

So lets say I wanted to find game rows that had the game type column set
to 1. How would I set that up?


Thanks!

Attachments:
http://www.ruby-forum.com/attachment/10101/post-3164-0-78139100-1410968334.png


--
Posted via http://www.ruby-forum.com/.

Robby O'Connor

unread,
Sep 18, 2014, 3:10:58 PM9/18/14
to rubyonra...@googlegroups.com

I would strongly advise you go through Michael Harte 's rails tutorial. ...what you want is to understand what REST is and how it works...that's the premise behind a webapp api

--Rob
Sent from my cell, please excuse any typos.

--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/24de5d667b4ab3f9c30998d880318c5a%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Robby O'Connor

unread,
Sep 18, 2014, 3:11:21 PM9/18/14
to rubyonra...@googlegroups.com

Hartle's*

--Rob
Sent from my cell, please excuse any typos.

John R_

unread,
Sep 18, 2014, 3:58:59 PM9/18/14
to rubyonra...@googlegroups.com
lol, that is actually where I started from. But it seemed more geared
for front end websites. So I stopped at chapter 4.

I guess I'll go back to it :)

Colin Law

unread,
Sep 18, 2014, 4:13:23 PM9/18/14
to rubyonra...@googlegroups.com
On 18 September 2014 20:10, Robby O'Connor <robby....@gmail.com> wrote:
> Hartle's*

Actually Hartl's I think.

Colin

Colin Law

unread,
Sep 18, 2014, 4:17:38 PM9/18/14
to rubyonra...@googlegroups.com
On 18 September 2014 20:57, John R_ <li...@ruby-forum.com> wrote:
> lol, that is actually where I started from. But it seemed more geared
> for front end websites. So I stopped at chapter 4.
>
> I guess I'll go back to it :)

It is mostly geared towards front end as that is what most apps are.
In the code however there may be very little difference between the
two and a good way to develop an api may even be to have a simple
front end to use to test it. The only difference may be that when
used as an api you invoke the action.json rather than .html and render
the json value that you want to send back to the client instead of a
web page.

So well worth working right through the tutorial.

Colin

John R_

unread,
Sep 23, 2014, 10:48:58 AM9/23/14
to rubyonra...@googlegroups.com
I found this link very helpful as well

http://guides.rubyonrails.org/routing.html
Reply all
Reply to author
Forward
0 new messages