Class: Turl::TwitterUser
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Turl::TwitterUser
- Defined in:
- lib/turl/twitter_user.rb
Class Method Summary collapse
Class Method Details
.from_response!(resp) ⇒ Object
5 6 7 8 9 |
# File 'lib/turl/twitter_user.rb', line 5 def self.from_response!(resp) find_or_initialize_by(twitter_id: resp.id).tap do |u| u.update!(screen_name: resp.screen_name) end end |