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!

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

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

Hartle’s*

–Rob

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:

Actually Hartl's I think.

Colin

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

http://guides.rubyonrails.org/routing.html