Backend support for game

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!

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.

Hartle’s*

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

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 :slight_smile:

On 18 September 2014 20:10, Robby O’Connor [email protected]
wrote:

Hartle’s*

Actually Hartl’s I think.

Colin

On 18 September 2014 20:57, John R_ [email protected] 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 :slight_smile:

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

I found this link very helpful as well