New Discussion

Notifications

You’re not receiving notifications from this thread.

Extracting Reusable Base Classes In Ruby Discussion

3
General

The cat is still playing in the background πŸ˜‚

He's always causing a ruckus or being lazy. Nothing in-between! 🐈

Is there any benefit to using the constant for the base URL instead of just using a method and overwriting it in each inherited client? Looking forward to the generator episode! I've been playing around with Rails generators recently to build out my own Rails template so I can stop copying/pasting code every time I start a new project.

A constant is faster to lookup since it's saved, but a method that returns the string would work fine too.

Also we just published the generators episode!

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.