Rails architecture tips from route helpers
25-Jun-2020 1569
I wanted to share a little something cute I noticed a couple of weeks ago while adding a new feature to an old Rails application. It gave me a new appreciation for the attention to detail that the authors of the Rails framework put into making it a pleasant development experience.For the sake of demonstration, let’s pretend I was adding a new endpoint for a user to add an avatar to their account, and for other users to view that avatar. Due to other imaginary implementation details, we use a third-party service for handling avatars, and not a few extra fields on the existing users table in the database backing our app. We just need to integrate with that made-up service. An avatar could be server-rendered HTML, or an API that returns JSON–again, doesn’t matter for this story.
Rails architecture tips from route helpers #ruby #rubydeveloper #rubyonrails #Rails #architecture #route #helpers #architecture https://rubyonrails.ba/link/rails-architecture-tips-from-route-helpers