-
-
Save T-800/51d507a09f87e47db235cbbd7f6dda7a to your computer and use it in GitHub Desktop.
Revisions
-
igor-alexandrov revised this gist
Mar 29, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,10 @@ class Fund::CreateCallForm < BaseForm property :type property :fund validation do required(:type) { filled? & included_in?(TRANSACTION_TYPES['Fund::Call']) } end validation if: -> (results) { rebalance? } do required(:fund).filled end -
igor-alexandrov revised this gist
Mar 29, 2017 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,12 @@ class Fund::CreateCallForm < BaseForm property :type property :fund validation if: -> (results) { rebalance? } do required(:fund).filled end def rebalance? self.type == 'rebalance' end end -
igor-alexandrov renamed this gist
Mar 29, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
igor-alexandrov created this gist
Mar 29, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ validation if: -> (results) { rebalance? } do required(:fund).filled end def rebalance? self.type == 'rebalance' end