On Thursday, June 29, 2017 at 2:40:37 PM UTC-7, Max Farrar wrote:
>
> I posted this as a bug report since I think it may be one, but I'm posting 
> here too since I haven't gotten any response.
>

A couple hours is considered too long? :)

In general, as the contribution guidelines explain, if you aren't sure it 
is a bug, post here.  Only file an issue on GitHub if you are sure it is a 
bug in Sequel.
 

>
> I'm having a weird issue that I've never seen before, where an item isn't 
> being updated..
>
>
> Example:
>
> available = $db[:users].where(:active=>0)
> first_user = available.first
> first_user.update(:active => 1)
>
>
> Unless I'm mistaken, this should update the non-active user to be 
> 'active', however it's not actually modifying the user.. if I print out 
> $db[:users].all, it won't show that user as having :active changed to a 1.
>
>
> I've tried all sorts of variations, including 
> $db[:users].where(:active=>0).first.update(:active=> 1)... still not 
> working.
>

As I responded to in the issue, you are calling Hash#update, which only 
updates the hash.  Either use Sequel::Model#update or 
Sequel::Dataset#update to update the database.

Thanks,
Jeremy 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to