module VkontakteAuthentication::Session::InstanceMethods
Public Instance Methods
new_registration=(value)
click to toggle source
# File lib/vkontakte/session.rb, line 15 def new_registration=(value) @new_registration = value end
new_registration?()
click to toggle source
# File lib/vkontakte/session.rb, line 19 def new_registration? @new_registration.presence end
Private Instance Methods
authenticating_with_vkontakte?()
click to toggle source
# File lib/vkontakte/session.rb, line 24 def authenticating_with_vkontakte? record_class.vkontakte_enabled_value && controller.cookies[record_class.vk_app_cookie].present? end
find_by_vk_id_method()
click to toggle source
# File lib/vkontakte/session.rb, line 65 def find_by_vk_id_method self.class.find_by_vk_id_method end
map_vkontakte_data()
click to toggle source
# File lib/vkontakte/session.rb, line 59 def map_vkontakte_data self.attempted_record.send("#{klass.login_field}=", @vkontakte_data[:user][:nickname]) if self.attempted_record.send(klass.login_field).blank? self.attempted_record.send("first_name=", @vkontakte_data[:user][:first_name]) if @vkontakte_data[:user][:first_name] self.attempted_record.send("last_name=", @vkontakte_data[:user][:last_name]) if @vkontakte_data[:user][:last_name] end
record_class()
click to toggle source
# File lib/vkontakte/session.rb, line 73 def record_class self.class.klass end
vk_id_field()
click to toggle source
# File lib/vkontakte/session.rb, line 69 def vk_id_field record_class.vk_id_field end