Use form models to handle this problem Or soften the validation to validates_presence_of :parent
Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger
Reason: You very likely have a model that has a delay attribute. You can configure Sidekiq to remove its delay...
In tests, it is sometimes useful to create records with specific ids. On PostgreSQL this can cause problems: Usually, PostgreSQL...
The easiest way to freeze or travel through time in a Jasmine spec is to use the built-in jasmine.clock...
The Bullet gem is designed to help you increase your application's performance by reducing the number of queries it...
The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...
tl;dr: Use event.currentTarget unless you are absolutely certain that you need event.target. Since it hasn't been written down...
Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...
This blew my mind today: 12 Little-Known CSS Facts 12 Little-Known CSS Facts (The Sequel) Please make sure...
Sometimes you need to run background jobs that you can't make important guarantees about - they may run out of...
Large projects usually have large test suites that can run for a long time. This can be annoying as running...
In most of our applications, users have their first and last name stored in separate columns. However, specifying them separately...
Disabling auto-complete in login forms is probably a bad idea, since it encourages weak passwords. If you are still...
In my RubyMine I have recorded two macros for debugging and linked them to some keyboard shortcuts. Since I believe...
When working with ActiveType you will often find it useful to cast an ActiveRecord instance to its extended ActiveType::Record...
Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.
There is no such thing as a "default order" of rows in database tables. For instance, when you paginate a...
HTTP/2 will make our applications faster, simpler, and more robust—a rare combination—by allowing us to undo many of...
ActiveModel supplies an errors object that behaves similar to a Hash. It can be used to add errors to a...
All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and...
sslscan is a nice tool to show details about TLS/SSL connections: ~> sslscan some-host-at.makandra.de Testing SSL server some-host-at.makandra.de on port 443...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...
FactoryBot.define do factory :parent do transient do child_name nil child_allowed_to_drive false end child do association(:child...