rubyonrailsin

A Ruby and Rails talk

Tuesday, March 30, 2010


[Rails] Too Simple for Rails?

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I want to create a simple app.

On one page, I want a form. This form has a single field for a ticket
number. When someone enters a ticket number and submits the form, they
are shown a second page with links to download files. And here is a
list of other criteria:

- validate ticket numbers (is a number within a certain range)
- "used" tickets are stored in the database
- if a ticket is not in the database, add it
- if a ticket is in the database, increase "count" field by one

This seems simple enough, but I don't quite understand how to take all
of rails discrete processes (create using POST, update using PUT, show
using GET, all in separate actions within a controller) and roll it
all up into a single controller (or put it in the model, which makes
sense).

Should I scrap trying to use ActiveRecord and go to straight Ruby for
this? I've never done database access straight from Ruby before.

Here's the code: http://github.com/partydrone/ticket_check

Any suggestions would be helpful. Thank you.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive