Skip to content

Commit

Permalink
Remove unecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira committed Jan 4, 2022
1 parent 76316e3 commit c506438
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/api/app/models/binary_release.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
class BinaryRelease < ApplicationRecord
#### Includes and extends
#### Constants
#### Self config
class SaveError < APIError; end

#### Attributes
#### Associations macros (Belongs to, Has one, Has many)
belongs_to :repository
belongs_to :release_package, class_name: 'Package' # optional
belongs_to :on_medium, class_name: 'BinaryRelease'

#### Callbacks macros: before_save, after_save, etc.
before_create :set_release_time

#### Scopes (first the default_scope macro if is used)

#### Validations macros
#### Class methods using self. (public and then private)
def self.update_binary_releases(repository, key, time = Time.now)
begin
notification_payload = ActiveSupport::JSON.decode(Backend::Api::Server.notification_payload(key))
Expand All @@ -25,7 +15,6 @@ def self.update_binary_releases(repository, key, time = Time.now)
return
end
update_binary_releases_via_json(repository, notification_payload, time)
# drop it
Backend::Api::Server.delete_notification_payload(key)
end

Expand Down Expand Up @@ -123,14 +112,10 @@ def self.update_binary_releases_via_json(repository, json, time = Time.now)

e.obsolete_time = time
e.save!
# create an additional "removed" entry here? No one asked for it yet ....
end
end
end

#### To define class methods as private use private_class_method
#### private
#### Instance methods (public and then protected/private)
def set_release_time!
self.binary_releasetime = Time.now
end
Expand Down Expand Up @@ -237,8 +222,6 @@ def set_release_time
def update_for_product
repository.product_update_repositories.map(&:product).uniq
end

#### Alias of methods
end

# == Schema Information
Expand Down

0 comments on commit c506438

Please sign in to comment.