Re: [Rails] advice, examples, creating front-end for postgresql

14 views
Skip to first unread message

Hassan Schroeder

unread,
May 12, 2013, 2:41:41 PM5/12/13
to rubyonra...@googlegroups.com
On Sat, May 11, 2013 at 12:17 PM, spectergeek <spect...@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.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

tamouse mailing lists

unread,
May 12, 2013, 3:44:30 PM5/12/13
to rubyonra...@googlegroups.com
On Sat, May 11, 2013 at 2:17 PM, spectergeek <spect...@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.

spectergeek

unread,
May 13, 2013, 2:12:50 PM5/13/13
to rubyonra...@googlegroups.com

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
Reply all
Reply to author
Forward
0 new messages