run rubocp --fix
This commit is contained in:
parent
1ca72dcf74
commit
2b2745ade9
26 changed files with 104 additions and 107 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserDatatable < AjaxDatatablesRails::Base
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ module ConferenceHelper
|
|||
|
||||
def short_ticket_description(ticket)
|
||||
return unless ticket.description
|
||||
|
||||
markdown(ticket.description.split("\n").first&.strip)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -310,7 +310,6 @@ class Event < ApplicationRecord
|
|||
event_schedules.find_by(schedule_id: selected_schedule_id).try(:happening_now?)
|
||||
end
|
||||
|
||||
|
||||
##
|
||||
# Returns true or false, if the event is already over or not
|
||||
#
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Payment < ApplicationRecord
|
|||
end
|
||||
|
||||
def stripe_description
|
||||
#"ticket purchases(#{user.username})"
|
||||
# "ticket purchases(#{user.username})"
|
||||
"Tickets for #{conference.title} #{user.name} #{user.email}"
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ end
|
|||
def count_purchased_registration_tickets(conference, purchases)
|
||||
# TODO: WHAT CAUSED THIS???
|
||||
return 0 unless purchases
|
||||
|
||||
conference.tickets.for_registration.inject(0) do |sum, registration_ticket|
|
||||
sum + purchases[registration_ticket.id.to_s].to_i
|
||||
end
|
||||
|
|
|
|||
|
|
@ -101,9 +101,8 @@ class User < ApplicationRecord
|
|||
[:database_authenticatable, :registerable,
|
||||
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
|
||||
:omniauthable,
|
||||
omniauth_providers: [:suse, :google, :facebook, :github, :discourse]
|
||||
omniauth_providers: [:suse, :google, :facebook, :github, :discourse]]
|
||||
# omniauth_providers: [:google, :discourse]
|
||||
]
|
||||
end
|
||||
|
||||
devise(*devise_modules)
|
||||
|
|
@ -206,6 +205,7 @@ class User < ApplicationRecord
|
|||
# Partials should *not* directly call `gravatar_url`
|
||||
def profile_picture(opts = {})
|
||||
return gravatar_url(opts) unless picture.present?
|
||||
|
||||
size = (opts[:size] || 0).to_i
|
||||
if size < 50
|
||||
picture.tiny.url
|
||||
|
|
@ -346,7 +346,6 @@ class User < ApplicationRecord
|
|||
events.where(program_id: conference.program.id, 'event_users.event_role': 'volunteer')
|
||||
end
|
||||
|
||||
|
||||
def self.empty?
|
||||
User.count == 1 && User.first.email == 'deleted@localhost.osem'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# index_conferences_on_organization_id (organization_id)
|
||||
#
|
||||
#!/bin/env ruby
|
||||
# !/bin/env ruby
|
||||
require 'spec_helper'
|
||||
|
||||
describe Conference do
|
||||
|
|
|
|||
|
|
@ -35,6 +35,6 @@ def mock_commercial_request
|
|||
end
|
||||
|
||||
def mock_image_request
|
||||
WebMock.stub_request(:post, "https://api.cloudinary.com/v1_1/snapcon/image/destroy").
|
||||
to_return(status: 200, body: {}.to_json, headers: {})
|
||||
WebMock.stub_request(:post, "https://api.cloudinary.com/v1_1/snapcon/image/destroy")
|
||||
.to_return(status: 200, body: {}.to_json, headers: {})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ module OmniauthMacros
|
|||
ENV['OSEM_DISCOURSE_KEY'] = 'test key discourse'
|
||||
ENV['OSEM_DISCOURSE_SECRET'] = 'test secret discourse'
|
||||
|
||||
|
||||
|
||||
def mock_auth_new_user
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue