Dominic Sayers

Results 10 comments of Dominic Sayers

Hi Kyle, If it needs a code change to enable this, I'm happy to review and merge a pull request. Other than that, I'm not actively working on this gem...

It seems OK for me. I tried something like this: ``` mailchimp = Mailchimp.connect mailchimp.lists[0].members.first_or_create name: 'Dominic Sayers' ``` Internally, `first_or_create` calls the `find_by` method. Can you repeat your test...

No, Ruby returns the last thing that was evaluated in the method. It's normal Ruby style to not use `return` unless you want to return early from a method.

On the more substantive point, I copied your code fragment into a script and ran it: ```Ruby MAILCHIMP = Mailchimp.connect @emails = ['[email protected]'] @emails.each do |email| attributes = { "email_address":...

``` puts record ``` explicitly invokes the `to_s` method of `Mailchimp::List:Member` ([#L50-L52](https://github.com/dominicsayers/mailchimp_api_v3/blob/349dc2bb8102f2f59e7bb5eae92f055b81bd43f7/lib/mailchimp_api_v3/member.rb#L50-L52)) `'Account: ' + record` might imply a different sort of addition and Ruby complains in case you meant...

@leikind If you could give me a clue how you'd approach this I don't mind having a go and submitting a PR.

For anybody else encountering this issue, the workaround I found was to define a `custom_order` which substitutes zeroes for null values. Like this: ``` @hosts_grid = initialize_grid(Host, custom_order: { 'hosts.something_numeric'...

@leikind thanks!

Most useful for me would be a config setting. Difficult to think of a situation where you'd want different columns to have different behaviour :-)

Bump (or hand over the project?)