search for: token_authenticat

Displaying 4 results from an estimated 4 matches for "token_authenticat".

2011 Jun 11
1
Having a problem adding a foreign key
...; <p><%= f.text_field :author %></p> <p><%= f.submit "Add book"%> BOOK MODEL class Book < ActiveRecord::Base belongs_to :user end USER MODEL class User < ActiveRecord::Base has_many :books # Include default devise modules. Others available are: # :token_authenticatable, :lockable, :timeoutable and :activatable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation,:firstname,:lastna...
2013 Mar 07
0
custom table_name for table users with devise
...e several tables for users (franceusers, belgiumusers, ...) and I would like to use one or another depending on domain I tried with table_name_prefix and table_name but it seems to not work class User < ActiveRecord::Base rolify # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, #:confirmable, :recoverable, :rememberable, :trackable, :validatable def self.table_name debugger ''franceusers'' end def self.table_name_pref...
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday. I would go to the root of my site and I would get a Too Many Redirects message. It seems like there was an infinite loop. After struggling for over an hour yesterday late at night, it seemed like I fixed it. But now, when I want to create a New User, it''s redirecting me to the Sign In screen. Seems like I didn''t fix the problem completely. I
2011 Nov 05
13
Adding a site admin user while creating a site
.... ( user model was created using devise then i customized it). *Below are my models:* *User model* ------------------------------- class User < ActiveRecord::Base *belongs_to :sites ########### I have added this * # Include default devise modules. Others available are: # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_c...