wco_models 3.1.0.262 → 3.1.0.264

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d069624be18990f577a4639d0dc8aa4a6d0431aeca342ea54ff93cb273403cf
4
- data.tar.gz: 90484ba830bf4c5cf69d7301dc81a230a0acdcfa10beb9d9de754c2c8ee28cc3
3
+ metadata.gz: 06f4f98ee3c36e42af419ef0778c2b1dcef99b45b6950a0b8e0847e4f122ab84
4
+ data.tar.gz: 3156138556995606ce6c338af1fc675b678da32a6c4a2996e3c1c6c6fc8096e8
5
5
  SHA512:
6
- metadata.gz: e6e828d116a91b9f0c5838b0d9fd095061a91578e95f824a04ba158f209c88d9b3fa4350aeac75d11afc2296498ebbb2ab7c16dfd052670262567bca8d683d3b
7
- data.tar.gz: b94117443145eb60798b965bce0c2ac6bf7485a25fba0df08d918b9070e4a477d590c4e31ba32a00939d5952941e423081684689a37a2bf6a2b54eb62297dcc0
6
+ metadata.gz: 3fdab086ab82d058301d86f1b85fac771df0fbedac5418ff503218b04d960cd09ca2a73bebee5aaee4a57f9a910b259b0ea046d5224a62790286108370c863ee
7
+ data.tar.gz: 82e604c3c74303c03b7db2a007f1ddb0e6725d77957c86355ca0e749af9b7dadd7d6e6e15d2f2d3528e22d72ddd5f2387e6e9b5a061118801810955613215e2f
@@ -70,16 +70,14 @@ table.bordered {
70
70
  }
71
71
  }
72
72
 
73
- table {
74
- thead.sticky {
75
- background: #ccc;
76
-
77
- th {
78
- position: sticky;
79
- top: 0;
80
- background: white;
81
- z-index: 10;
82
- }
73
+ table.sticky thead,
74
+ table thead.sticky {
75
+ background: #ccc;
76
+
77
+ th {
78
+ position: sticky;
79
+ top: 0;
80
+ z-index: 10;
83
81
  }
84
82
  }
85
83
 
@@ -105,9 +105,9 @@ class Wco::TagsController < Wco::ApplicationController
105
105
  authorize! :show, @tag
106
106
 
107
107
  @galleries = @tag.galleries.page( params[:galleries_page] ).per( current_profile.per_page )
108
- @leadsets = @tag.leadsets.page( params[::Wco::Leadset::PAGE_PARAM_NAME] ).per( current_profile.per_page )
109
- @reports = @tag.reports.page( params[:reports_page] ).per( current_profile.per_page )
110
-
108
+ @leads = @tag.leads.page( params[::Wco::Lead::PAGE_PARAM_NAME] ).per( current_profile.per_page )
109
+ @leadsets = @tag.leadsets.page( params[::Wco::Leadset::PAGE_PARAM_NAME] ).per( current_profile.per_page )
110
+ @reports = @tag.reports.page( params[:reports_page] ).per( current_profile.per_page )
111
111
  end
112
112
 
113
113
  def update
@@ -14,8 +14,7 @@ class Iro::Purse
14
14
 
15
15
  has_many :positions, class_name: 'Iro::Position', inverse_of: :purse
16
16
 
17
- # has_and_belongs_to_many :strategies, class_name: 'Iro::Strategy', inverse_of: :purses
18
- # belongs_to :stock, class_name: 'Iro::Stock', inverse_of: :strategies
17
+ has_many :strategies, class_name: 'Iro::Strategy', inverse_of: :purse
19
18
 
20
19
  field :unit, type: :integer, default: 10
21
20
  ## with unit 10, .001
@@ -5,7 +5,7 @@ class Iro::Strategy
5
5
  include Mongoid::Paranoia
6
6
  store_in collection: 'iro_strategies'
7
7
 
8
- field :description
8
+ field :descr
9
9
 
10
10
  LONG = 'long'
11
11
  SHORT = 'short'
@@ -17,11 +17,11 @@ class Iro::Strategy
17
17
  field :credit_or_debit, type: :string, default: 'credit'
18
18
  validates :credit_or_debit, presence: true
19
19
 
20
-
21
20
  has_many :positions, class_name: 'Iro::Position', inverse_of: :strategy, dependent: :destroy
22
- has_one :next_position, class_name: 'Iro::Position', inverse_of: :next_strategy ## _TODO: makes no sense...
21
+ ## _TODO: makes no sense...
22
+ has_one :next_position, class_name: 'Iro::Position', inverse_of: :next_strategy
23
23
  belongs_to :stock, class_name: 'Iro::Stock', inverse_of: :strategies
24
- # has_and_belongs_to_many :purses, class_name: 'Iro::Purse', inverse_of: :strategies
24
+ belongs_to :purse, class_name: 'Iro::Purse', inverse_of: :strategies
25
25
 
26
26
  KIND_COVERED_CALL = 'covered_call'
27
27
  KIND_IRON_CONDOR = 'iron_condor'
@@ -87,14 +87,13 @@ class Iro::Strategy
87
87
  field :threshold_dte, type: :integer, default: 1
88
88
 
89
89
  field :next_inner_delta, type: :float
90
- field :next_inner_strike, type: :float
90
+ field :next_inner_strike, type: :float ## can be nil, poor design?
91
91
  field :next_outer_delta, type: :float
92
92
  field :next_outer_strike, type: :float
93
93
  field :next_spread_amount, type: :float # e.g. $20 for a $2000 NVDA spread
94
94
 
95
- field :next_threshold_usd_above_mark, type: :float
96
- validates :next_threshold_usd_above_mark, presence: true
97
- def next_buffer_above_water; next_threshold_usd_above_mark; end
95
+ field :next_usd_above_mark, type: :float
96
+ validates :next_usd_above_mark, presence: true
98
97
 
99
98
  def begin_delta_covered_call p
100
99
  p.inner.begin_delta
@@ -362,7 +361,7 @@ class Iro::Strategy
362
361
  # "#{kind} #{stock}"
363
362
  # end
364
363
  def to_s
365
- "#{kind} #{stock}"
364
+ "#{kind} #{stock} #{descr}"
366
365
  end
367
366
  def self.list long_or_short = nil
368
367
  these = long_or_short ? where( long_or_short: long_or_short ) : all
@@ -12,7 +12,7 @@ class Wco::Leadset
12
12
  index({ company_url: 1 }, { unique: true, name: 'company_url' })
13
13
  before_validation :normalize_company_url, on: :create
14
14
  def normalize_company_url
15
- company_url.downcase rescue company_url
15
+ company_url.downcase
16
16
  end
17
17
  def domain; company_url; end # for anti-spam
18
18
  def self.from_email email
@@ -1,10 +1,11 @@
1
1
 
2
2
  .Leads.leads--index.--index
3
3
  <b>Leads:</b>
4
+ = paginate leads, param_name: Wco::Lead::PAGE_PARAM_NAME
4
5
  %ul
5
6
  - leads.each do |lead|
6
7
  %li.item
7
8
  = image_tag lead.photo.photo.url(:thumb) if lead.photo
8
9
  = link_to lead, wco.lead_path(lead)
9
10
  = link_to '[~]', wco.edit_lead_path(lead)
10
- <b>Tags:</b> #{ lead.tags.map { |tag| tag.to_s } }
11
+ <b>Tags:</b> #{ lead.tags.map { |tag| tag.to_s } }
@@ -18,7 +18,7 @@
18
18
 
19
19
  .field
20
20
  %label leadset
21
- = f.select :leadset, options_for_select(Wco::Leadset.list, selected: profile.leadset_id )
21
+ = f.select :leadset, options_for_select(Wco::Leadset.list, selected: profile.leadset_id ), {}, { class: 'select2' }
22
22
 
23
23
  %hr
24
24
  .row
@@ -46,8 +46,8 @@
46
46
 
47
47
  %hr
48
48
  %i.fa.fa-compress.collapse-expand#leads
49
- Leads: (#{@tag.leads.length}):
50
- = render '/wco/leads/index', leads: @tag.leads.page( params[::Wco::Lead::PAGE_PARAM_NAME] )
49
+ Leads: (#{@leads.length}):
50
+ = render '/wco/leads/index', leads: @leads
51
51
 
52
52
  %hr
53
53
  %i.fa.fa-compress.collapse-expand#reports
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.262
4
+ version: 3.1.0.264
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-04 00:00:00.000000000 Z
11
+ date: 2026-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ahoy_matey