Ask A Question

Notifications

You’re not receiving notifications from this thread.

Organizing Rails Model Files Discussion

Great episode, Collin: thank you

I also found the annotate output at the top of the file annoying, so my team now has annotate config set to output at the bottom of the file:

Annotate.set_defaults({
  'position_in_routes'      => "bottom",
  'position_in_class'       => "bottom",
  'position_in_test'        => "bottom"
})
Reply

Thanks, Terry! Glad you liked this one.

Thanks for sharing that annotate config! I've actually never looked into if there was an alternative to placing the comments at the top so this is great to know now.

Reply

+1

Reply

I always wondered about good practices how to order things in my model. Thanks for that and the gotchas.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 79,047+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2023 GoRails, LLC. All rights reserved.