wco_models 3.1.0.263 → 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: 74411b5f6d7e9b1d2c6de54a15dc3438e00440d48220f545e7c6088fd2c6b519
4
- data.tar.gz: 95a99dc3e85cd510fe4aeb0c5a6233e105691953231eeecbeeb1bef75460e292
3
+ metadata.gz: 06f4f98ee3c36e42af419ef0778c2b1dcef99b45b6950a0b8e0847e4f122ab84
4
+ data.tar.gz: 3156138556995606ce6c338af1fc675b678da32a6c4a2996e3c1c6c6fc8096e8
5
5
  SHA512:
6
- metadata.gz: b1219a5f7c28b3b828c32db3357c40f9e4974470769dc65a11ee9580ffb5b26fa033d28a8d033ab9424c26a45f556ca2e134628cc963e5aae25254c300f4439c
7
- data.tar.gz: fdd901493b1083ed8818bcf5c88e55766b2b1e6f008aa26d28fff389c008a61e205a9c37c52908c981f49a82ee0a15189aa76b249fde88011fca84b5ed32434b
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
 
@@ -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
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.263
4
+ version: 3.1.0.264
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev