search for: from_omniauth

Displaying 2 results from an estimated 2 matches for "from_omniauth".

2013 Aug 26
2
linkedin login using omniauth
...ication using omniauth gem..I used omniauth gem for Fb login and it''s working fine..but it''s not working for linkedin login this is my code /model/user.rb class User < ActiveRecord::Base attr_accessible :name, :oauth_expires_at, :oauth_token, :provider, :uid def self.from_omniauth(auth) where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user| user.provider = auth.provider user.uid = auth.uid user.name = auth.info.name user.oauth_token = auth.credentials.token user.oauth_expires_at = Time.at(auth.credentials.expires_at) user...
2012 Jan 18
4
Adding a custom select to omniauth register form
...1.9.2 I''m having trouble adding a select field that populates from a class constant in my user model. Here''s my model: class User < ActiveRecord::Base ROLES = ["Customer","Service Supplier"] has_many :leads validates_presence_of :role def self.from_omniauth(auth) ... end def self.create_with_omniauth(auth) ... end end Here''s a snippet of my view from identities/new.html.erb: <%= form_tag "/auth/identity/register" do %> … <div class="field"> <%= label_tag :role %><br> <%=...