RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

How to override default primary key in Rails?

Rails is about CoC, the convention is to use :id as the primary key. So what if you want something different as your primary key? Author Trung Lê will walk you through few simple tricks that does the justice. Read more on his blog at:

http://ruby-journal.com/how-to-override-default-primary-key-id-in-rails/

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in