On Sat, May 11, 2013 at 2:17 PM, spectergeek <specterg...@gmail.com> wrote:
> Creating a production DB (not production as in rails terms but production as
> in from sales order to shipping) for a small business. I'm completely new to
> rails and fairly new to web development. I'm going through  the tutorial
> here http://ruby.railstutorial.org. But it's focused on a website (obviously
> best for most) and its a very good tutorial but I was hoping to find some
> examples for using rails as just a front end to Postgresql basically show
> views and allow db admins to manage users and allow other users to enter the
> info they are required to (e.g. sales orders). In other words, just a user
> front end to the db. Thanks for any help.

The most rudimentary Rails app consists of nothing much other than
CRUD operations on tables in a database. Nothing special about what
kind of database, you just have to say what kind it is in the
config/database.yml file.

Basic scaffolding generates models that fit the exact scenario you're
describing: create, read, update, delete (CRUD) records in various
tables in your data base.

If you're database tables have relationships that you care about, you
need to dig a little deeper of course, and look at ActiveRecord
relationships.

Assuming your postgresql database already exists, you can still run
the scaffolding generators for it, but it becomes a bit more
complicated from then on. You don't want to run the migrations they
generate, as they will destroy the existing database. Likewise, using
rake to run tests will fail as it checks to see that all migrations
have been applied.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to