Chris Oliver

Joined

293,010 Experience
93 Lessons Completed
296 Questions Solved

Activity

Posted in Template Locals in Rails 7.1 Discussion

That should work but let me know if it doesn't!

Posted in How to use Mission Control Jobs in Rails Discussion

Yeah, Puma is the Rails default.

Posted in How to use Mission Control Jobs in Rails Discussion

Super excited to see Mission Control out in the wild. It's a dashboard for ActiveJob that works across queue adapters. What's nice is that in the long term you can swap out backends but still have the same UI for monitoring and retrying jobs.

Posted in Dynamic Single Table Inheritance with Rails Discussion

This was really fun. I wanted an easy way to introduce helpers to Notifications so by exposing them also as STI models, we could make them easily accessible with separate helper methods for each Notifier type. Super cool how flexible Ruby is for allowing these types of solutions!

Posted in What's New In Ruby 3.3 Discussion

ASDF users use an env var to use the latest ruby-build:

ASDF_RUBY_BUILD_VERSION=master asdf install ruby 3.3.0

Posted in What's New In Ruby 3.3 Discussion

Probably today.

Posted in What's New In Ruby 3.3 Discussion

Happy Holidays and New Year everyone! 🥳

Depends on if you're using those features, but you might still want Redis. There is also a PostgreSQL adapter you can use for ActionCable as well.

Yep, just call it "jobs:" because web would be the name for the Rails server.

Yeah, that's an excellent point about Heroku! So long as memory usage is can live inside the dyno safely I guess.

You can setup Solid Queue to use a separate database by defining this config which will be applied to all the SolidQueue models.

# Use a separate DB for Solid Queue
config.solid_queue.connects_to = { database: { writing: :solid_queue_primary, reading: :solid_queue_replica } }

Please share what the actual issues are, otherwise we can't help much. 👍

Posted in Rails 7.1 Authentication From Scratch - Test Helpers

For controller & integration tests, you'll make a POST request to log the user in:

class ActiveSupport::TestCase
  def login(user, password: "password")
    post login_path, params: {
      email: user.email,
      password: password
    }
  end
end

Posted in How will HatchBox handle manually installed software?

What do you want to know?

The math is fast to do, so that would be fine to convert each time.

You could also use a virtual generated column to do the calculation at the database level. See this lesson: https://gorails.com/episodes/virtual-generated-columns-with-activerecord

Where does esbuild acknowledge this issue?

That is a great idea. I will definitely do that. 👍

Posted in Template Locals in Rails 7.1 Discussion

This is a great addition to Rails. It makes partials feel a lot like calling methods with required and optional arguments.

Posted in Will there be a Black Friday 2023 Sale?

Yes, we will. It should go live on Thursday. 👍

Posted in Single Responsibility Principle Discussion

No, top level under app is not namespaced. Same reason why app/models/users doesn't get wrapped in a Models module.

ActionText::ContentHelper.sanitizer.class.allowed_tags += %w[iframe script blockquote time]
ActionText::ContentHelper.sanitizer.class.allowed_attributes += ["data-id", "data-flickr-embed", "target"]