I'm implementing OmniAuth for LinkedIn on my sign in page, but I'm getting this error:
SyntaxError
/app/models/user.rb:9: syntax error, unexpected '\n', expecting =>
The code it's looking at is this:
class User < ActiveRecord::Base
attr_accessor :email, :password, :password_confirmation
VALID_EMAIL_REGEX = /([\w+.]+)@[a-z0-9\-.]+\.[a-z]+/i
validates :email, presence: true,
format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
validates :password, presence: true, length: { minimum: 6 }
validates :password_confirmation, presence: true
devise :rememberable, :omniauthable, :omniauth_providers => [:linkedin], :trackable
end
Any suggestions please?
尝试重新排序
devise :rememberable, :omniauthable, :trackable, :omniauth_providers => [:linkedin]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.