- Auto-fixed 143 code style violations using rubocop -A - Fixed RuboCop configuration: moved rubocop-rspec_rails to plugins - Removed redundant || 0 patterns after .to_i calls - Fixed RSpec describe class format - Added remaining naming violations to exclude list for future cleanup - Reduced violations from 100 to 0 offenses
13 lines
253 B
Ruby
13 lines
253 B
Ruby
module AccessTokenable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
has_one :access_token, as: :owner, dependent: :destroy_async
|
|
after_create :create_access_token
|
|
end
|
|
|
|
def create_access_token
|
|
AccessToken.create!(owner: self)
|
|
end
|
|
end
|