odd number of arguments for Hash

2021-08-28 Thread bee...@gmail.com
env/versions/2.7.3/lib/ruby/gems/2.7.0/gems/sequel-5.46.0/lib/sequel/model/base.rb:1846:in `_save_update_all_columns_hash' /Users/rich/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/sequel-5.46.0/lib/sequel/model/base.rb:1846:in `[]': odd number of arguments for Hash (ArgumentError) Che

Re: odd number of arguments for Hash

2021-08-28 Thread Jeremy Evans
On Sat, Aug 28, 2021 at 2:26 PM bee...@gmail.com wrote: > Not sure why this is happening. I'm getting as an error. I've > tried using both directive and non-directive for @id in the initialize > method, with same error. Seems the object is the same column profile. Any > clue why this is happ

Re: odd number of arguments for Hash

2021-08-28 Thread bee...@gmail.com
OK, understood. How do I insist on required parameters, named or otherwise? On Saturday, August 28, 2021 at 9:41:51 PM UTC-4 Jeremy Evans wrote: > On Sat, Aug 28, 2021 at 2:26 PM bee...@gmail.com wrote: > >> Not sure why this is happening. I'm getting as an error. I've >> tried using both d

Re: odd number of arguments for Hash

2021-08-28 Thread bee...@gmail.com
Sorry...half way through a Saturday evening. I will try with a single hash thrown, but how do I require such a structure, given I can't manipulate the initialize? On Saturday, August 28, 2021 at 11:22:12 PM UTC-4 bee...@gmail.com wrote: > OK, understood. How do I insist on required parameters

Re: odd number of arguments for Hash

2021-08-29 Thread Marcelo Pereira
If you need to, you can call super in your initialize, passing the parameters the way Sequel models expect. Em dom., 29 de ago. de 2021 às 05:24, bee...@gmail.com escreveu: > Sorry...half way through a Saturday evening. I will try with a single > hash thrown, but how do I require such a structu

Re: odd number of arguments for Hash

2021-08-29 Thread Jeremy Evans
On Sat, Aug 28, 2021 at 8:22 PM bee...@gmail.com wrote: > OK, understood. How do I insist on required parameters, named or > otherwise? > Probably easiest to check for values after calling super: def initialize(values={}) super raise ArgumentError unless some_criteria # ... end

Re: odd number of arguments for Hash

2021-08-29 Thread bee...@gmail.com
Thank you On Sunday, August 29, 2021 at 11:24:57 AM UTC-4 Jeremy Evans wrote: > On Sat, Aug 28, 2021 at 8:22 PM bee...@gmail.com wrote: > >> OK, understood. How do I insist on required parameters, named or >> otherwise? >> > > Probably easiest to check for values after calling super: > > def