That fixed my problem. Long story short on the model name, I actually tried
to rename from Auth_user to AuthUser at your suggestion and ran into the
NameError so I changed it back and ran into the name error again! Setting
the :class for each of the associations seems to have fixed this (I thought
it had to do with caching since I was thorough about renaming (there was no
code referencing the offending model name). I'll refactor this model when I
have time later.
Thanks again.
Nic

On Wed, Mar 6, 2019 at 11:02 AM Jeremy Evans <[email protected]> wrote:

> On Wednesday, March 6, 2019 at 10:42:21 AM UTC-8, Nick Appelmans wrote:
>>
>> I don't know if this is relevant or I should make a separate post for
>> this topic but just in case it is: I renamed a model (AuthUser to
>> Auth_user), dropped the table (authusers), recreated the table with the new
>> model name (auth_users) and found that the old model name was still being
>> referenced when Sequel was working out the associations. Here is part of
>> the error message...
>>
>
> It is certainly not related to Mike's issue with constraint validations.
>
>
>> 2019-03-06 17:42:10 - NameError - uninitialized constant
>> MemberTracker::AuthUser
>> Did you mean?  MemberTracker::Auth_user (this happened when attempting to
>> find the associated class for
>> #<Sequel::Model::Associations::ManyToOneAssociationReflection
>> MemberTracker::Log.many_to_one :auth_user, :key=>:a_user_id>):
>>
>
> You probably need to change to:
>
>   Log.many_to_one :auth_user, :class=>"MemberTracker::Auth_user",
> :key=>:a_user_id
>
> It is kind of odd to change from AuthUser to Auth_user, though, as
> AuthUser would be the typical name for the class.
>
> 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.
>


-- 
Nick Appelmans, Ph.D.
(707) 834 6336

-- 
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