Forum: Ruby on Rails advice, examples, creating front-end for postgresql

7fbe943f9b82cf4f0b26ab42dada36b1?d=identicon&s=25 spectergeek (Guest)
on 2013-05-12 20:18
(Received via mailing list)
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.
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2013-05-12 20:43
(Received via mailing list)
On Sat, May 11, 2013 at 12:17 PM, spectergeek <spectergeek@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 ...

No, it's focused on - as the first sentence says - "web applications",
which is what you're talking about building.

There's nothing unusual about what you're describing.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse mailing lists (Guest)
on 2013-05-12 21:45
(Received via mailing list)
On Sat, May 11, 2013 at 2:17 PM, spectergeek <spectergeek@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.
7fbe943f9b82cf4f0b26ab42dada36b1?d=identicon&s=25 spectergeek (Guest)
on 2013-05-13 20:14
(Received via mailing list)
Hassan, Don't get me wrong. I'm very happy with the tutorial. It's just
a
lot of information to absorb. If I completely absorbed all the concepts,
I'm sure I would have it. It's the structure I find a little confusing
with
regards to the DB I've designed. Mostly I want the users seeing DB views
not real tables and I was hoping there was a more direct example of
rails
being used as a database UI.

Tamouse, The DB has many relation ships and spans about 20 tables. I'm
trying to stay away from scaffolding. The tutorial suggest staying away
from it and I think I need the DYI approach to ensure my understanding.
Most users I don't want dealing with any of the tables directly
(possibly
none). I want users instead to see DB views and do updates that update
multiple tables without there direct knowledge. I'll look into Active
Record more.

I was just hoping for an example more directly related to DB views and
more
in line with with a UI just for the betterment of my understanding.

Thanks,

Larry
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.