tramway-partner 1.0.4 → 1.0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/decorators/tramway/partner/organization_decorator.rb +1 -1
- data/app/decorators/tramway/partner/partnership_decorator.rb +1 -1
- data/app/forms/admin/tramway/partner/organization_form.rb +1 -1
- data/app/forms/admin/tramway/partner/partnership_form.rb +1 -1
- data/app/models/tramway/partner/application_record.rb +1 -1
- data/app/models/tramway/partner/partnership.rb +1 -1
- data/config/initializers/tramway.rb +1 -1
- data/lib/tramway/partner/generators/install_generator.rb +2 -2
- data/lib/tramway/partner/scopes.rb +1 -2
- data/lib/tramway/partner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 184ffe8c985f322e57a32fa3cd3990dd8450bb8f0ba9bfdc53bb1d9c2a961fb3
|
|
4
|
+
data.tar.gz: 748ccc9ec13698f4fbc23772fd93e2ad82ccec7bdbdb5b11034c65b3ea6ea966
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b89953167084952df1862a4e1d03a90e9d29e7bcc75e42b68414d6e5badcd902bcf41cbd126eed86c65f4fec6e4f3ba5aef12300e4a448e8048a029a09ad0ad1
|
|
7
|
+
data.tar.gz: 3725476e61a762a7e929a10f7dab8812b02d05abcd45f30b4066af123f24067262d3cf5951b3f1eb23e50d26657d634545ea17bafa6f0642863a8d0d73671090
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
class Admin::Tramway::Partner::PartnershipForm < ::Tramway::
|
|
3
|
+
class Admin::Tramway::Partner::PartnershipForm < ::Tramway::ApplicationForm
|
|
4
4
|
properties :partner_id, :organization_id, :partnership_type, :partner_type
|
|
5
5
|
|
|
6
6
|
associations :partner, :organization
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
class Tramway::Partner::Partnership < ::Tramway::
|
|
3
|
+
class Tramway::Partner::Partnership < ::Tramway::ApplicationRecord
|
|
4
4
|
belongs_to :organization, class_name: 'Tramway::Partner::Organization'
|
|
5
5
|
belongs_to :partner, polymorphic: true
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'rails/generators'
|
|
4
|
-
require 'tramway/
|
|
4
|
+
require 'tramway/generators/install_generator'
|
|
5
5
|
|
|
6
6
|
module Tramway::Partner::Generators
|
|
7
|
-
class InstallGenerator < ::Tramway::
|
|
7
|
+
class InstallGenerator < ::Tramway::Generators::InstallGenerator
|
|
8
8
|
include Rails::Generators::Migration
|
|
9
9
|
source_root File.expand_path('templates', __dir__)
|
|
10
10
|
|
|
@@ -4,12 +4,11 @@ module Tramway::Partner::Scopes
|
|
|
4
4
|
extend ActiveSupport::Concern
|
|
5
5
|
|
|
6
6
|
included do
|
|
7
|
-
|
|
7
|
+
Tramway::Partner::Partnership.partnership_type.values.each do |partnership_type|
|
|
8
8
|
define_method partnership_type.pluralize.to_sym do
|
|
9
9
|
query = <<-SQL
|
|
10
10
|
tramway_partner_partnerships.partnership_type = '#{partnership_type}'
|
|
11
11
|
AND tramway_partner_partnerships.partner_id = '#{id}'
|
|
12
|
-
AND tramway_partner_partnerships.state = 'active'
|
|
13
12
|
AND tramway_partner_partnerships.partner_type = '#{self.class.name}'
|
|
14
13
|
SQL
|
|
15
14
|
Tramway::Partner::Organization.joins(:partnerships).where(query)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-partner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.4
|
|
4
|
+
version: 1.0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Kalashnikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Rails engine for partners
|
|
14
14
|
email:
|
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: '0'
|
|
68
68
|
requirements: []
|
|
69
|
-
rubygems_version: 3.1
|
|
69
|
+
rubygems_version: 3.4.1
|
|
70
70
|
signing_key:
|
|
71
71
|
specification_version: 4
|
|
72
72
|
summary: Rails engine for partners
|