Activity
Please share what the actual issues are, otherwise we can't help much. 👍
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
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. 👍
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"]
Love seeing the internals of Rails features and learning just how simple they are. 👍
Yes! We will absolutely be adding a section (or two) on JavaScript in the Learning Path!
Nice to be able to remove dependencies like the Bullet gem and do this all in Rails!
Once you have the row as a Ruby hash, you can use transform_keys to modify the keys and renaming the CSV headers (keys) to the name you want.
The column is computed on select and not on insert/update.
Posted in The Behaviors Of Super Discussion
Using method(:method_name)
and method(:method_name).super_method
can be incredibly handy for debugging. 🔥
A superpower if you will. 😜
Posted in ActiveJob Perform All Later Discussion
This is handy especially for things like notifications where you need to queue up many separate jobs at once.
DHH's keynote went up on YouTube this morning, so it shouldn't be too long!
Devise will always get security updates applied automatically, so it's generally a good idea to still use it unless you're regularly doing security testing against your application.
Posted in Wrapping Up Our URL Shortener Discussion
Congrats to everyone who has made it this far! The URL shortener was a great little project and I'm sure there's lots more improvements you can add to it.
What did you think of this project?