Doing Sequel::Annotate.new(ModelClass).annotate(path) worked but it's going to be cumbersome for the long run.
Right now I have the following rake task desc "Update model annotations" task :annotate do require 'sequel/annotate' Sequel::Annotate.annotate(Dir['app/models/*.rb']) end It would be nice to be able to continue using task rather than annotating them one by one when they fail. What's your thinking on why it doesn't recognize some classes but recognizes others. For example one class it doesn't recognize is this class HashedPassword < Sequel::Model end I can use this model in the app. Here is the transcription from irb HashedPassword.all I, [2017-10-12T17:10:23.309227 #92314] INFO -- : (0.009435s) SELECT * FROM "hashed_passwords" => [] There are other "empty" models which do get annotated. for example this one class Address < Sequel::Model end Seems odd. On Thu, Oct 12, 2017 at 3:33 PM, Jeremy Evans <[email protected]> wrote: > On Wednesday, October 11, 2017 at 6:54:34 PM UTC-7, Tim Uckun wrote: >> >> Hey Guys. >> >> For some weird reason the annotate plugin does not annotate some of my >> models and it annotates others. I tried specifying a table name and that >> didn't work. >> >> When I look at the log I see that it's actually selecting the schema >> information for that table and when I run the query does display the >> records for that table but no annotation. >> >> There are no errors or anything so I am a loss to try and figure out how >> to debug this. >> > > If you are using Sequel::Annotate.annotate([path]), try using > Sequel::Annotate.new(ModelClass).annotate(path) and see if that makes a > difference. Sequel::Annotate.annotate will skip paths if it can't > recognize the class. > > If that doesn't provide enough information to fix it, please submit a > minimal self-contained example showing the problem. > > 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. > -- 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.
