Ruby on Rails Tuesday, January 31, 2012

I appreciate what you're trying to do. I've been a dba in the past and
have built apps using database credentials in the past.

But this is a mistake. They key to being successful with rails is to
leave behind the ways you did things before and embrace 'the rails
way'.

ActiveRecord using a single connection string to connect to the
database -- it's in the database.yml file in the /config directory.
Having it somehow use different credentials based on the user would
make things much more complicated than need be.

My advice -- forget about how you did things before and embrace the
powerful and fast tools that rails provides to do things.

In this case, use 'device' -- it's what almost everyone else uses and
you'll thank yourself later for doing so. If you proceed with the way
you're going then later on you'll kick yourself and wonder what the
hell you were thinking.

Best of luck.

On Mon, Jan 30, 2012 at 11:36 AM, Marcin S <msporysz06@gmail.com> wrote:
> Hello, Im trying to write a simple app  for company internal usage.
> The other applications we use (in php) authenticate users based on
> database credentials, and to be honest I have no idea how to implement
> this. Any suggestions will be great!
>
> --
> 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.
>

--
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