Skip to content

History / How To: Add a default role to a User

Revisions

  • before_create doesn't work for me (rails 5, ruby-2.3.1). before_validation fix the problem

    @rkorzen rkorzen committed Aug 2, 2016
  • using references will add an index automatically on the "role_id" field

    @waaadim waaadim committed Mar 20, 2015
  • Adjusted code snippets to use Markdown syntax highlighting

    @neanias neanias committed Feb 20, 2015
  • Fixed for Rails 4 compatibility

    @CamJN CamJN committed Jul 9, 2014
  • Updated How To: Add a default role to a User (markdown)

    @kuraga kuraga committed Sep 7, 2012
  • Updated How To: Add a default role to a User (markdown)

    jalcine committed Jul 17, 2012
  • Updated How To: Add a default role to a User (markdown)

    DVG committed Jul 10, 2012
  • Updated HOW TO: Add a default role to a User (markdown)

    DVG committed Jul 10, 2012