Sha256: 3bec4dcc90a67e065c23b81b23910d6b50e33278a86e31b84f54224be1ad6ac8

Contents?: true

Size: 532 Bytes

Versions: 17

Compression:

Stored size: 532 Bytes

Contents

module Integrity
  module Helpers
    module Resources
      def current_project
        @project ||= Project.first(:permalink => params[:project]) or raise Sinatra::NotFound
      end

      def current_commit
        @commit ||= current_project.commits.first(:identifier => params[:commit]) or raise Sinatra::NotFound
      end

      def update_notifiers_of(project)
        if params["notifiers"]
          project.update_notifiers(params["enabled_notifiers"] || [], params["notifiers"])
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
alphasights-integrity-0.1.10 lib/integrity/helpers/resources.rb
alphasights-integrity-0.1.9.3 lib/integrity/helpers/resources.rb
alphasights-integrity-0.1.9.4 lib/integrity/helpers/resources.rb
alphasights-integrity-0.1.9.5 lib/integrity/helpers/resources.rb
alphasights-integrity-0.1.9.6 lib/integrity/helpers/resources.rb
alphasights-integrity-0.1.9.7 lib/integrity/helpers/resources.rb
alphasights-integrity-0.1.9.8 lib/integrity/helpers/resources.rb
foca-integrity-0.1.9.3 lib/integrity/helpers/resources.rb
gforces-integrity-0.1.9.3 lib/integrity/helpers/resources.rb
gforces-integrity-0.1.9.4 lib/integrity/helpers/resources.rb
imbriaco-integrity-0.1.9.2.1 lib/integrity/helpers/resources.rb
imbriaco-integrity-0.1.9.2 lib/integrity/helpers/resources.rb
integrity-integrity-0.1.10 lib/integrity/helpers/resources.rb
integrity-integrity-0.1.9.3 lib/integrity/helpers/resources.rb
integrity-0.1.11 lib/integrity/helpers/resources.rb
integrity-0.1.10 lib/integrity/helpers/resources.rb
integrity-0.1.9.3 lib/integrity/helpers/resources.rb