Even when you're using bundler, it might be significant in which order your gems are listed in your Gemfile...
I highly recommend that you make use of RubyMine's feature to pin tabs. When you pin all "important" files...
...developer stories. Non-developer stories Non-developer stories should be clearly marked. They usually belong to the PM (or maybe people from the operations team). Those story can take all...
At times, it might be unavoidable to have different CSS rules for Internet Explorer than for sane browsers. Using Sass...
...an attack) will fill up our conntrack tables. Decide which option resolves the situation best with minimal impact on production: $ sudo conntrack -D -s 49.12.3.247 # example: delete all conntrack table...
...table names and execute a DROP TABLE statement for each. DO $$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP EXECUTE 'DROP...
SVG files often contain redundant information, like editor metadata or hidden elements. When esbuild handles your static assets, you can...
After I upgraded to Mac OS X Mavericks, I regularly got this error message when running Cucumber features with Selenium...
...this issue for PATCH/DELETE. If you make requests yourself, watch out for the following behavior. When you make an AJAX request PATCH /foo and the /foo action redirects to /bar...
When refactoring a sequence of steps to a new, more descriptive step, you can use the steps method and Ruby...
...an :expires options, the default is when the user closes her browser window (I believe). Expiration of Clearance tokens In recent versions of clearance, authentication tokens are stored in a...
When trying to intersect conditions of two scopes, be careful with ActiveRecord::Relation#merge: it overwrites existing conditions on the...
...and UTF-8) this might be what happened. You can override this behaviour by manually setting Encoding.default_external = 'UTF-8'. You should do this at the very beginning of your...
Consul 0.9 comes with many new features to optimize powers that only check access to a given record. e.g. Power.current.post...
last_name: migration_user.last_name, email: migration_user.email, phone: migration_user.phone ) end end end Now the best idea is to test this in the rails sandbox (so your development data stay untouched...
...rails console --sandbox 2.4.1 :003 > DataMigration.new.run Keep in mind our best practices for data migrations...
...to add additional fields to keep track of all localized versions, e.g. Article#name becomes Article#name_de and Article#name_en and Article#name returns the variant in the...
...at the requests's IP or Accept-Language HTTP header. Note that even the best default never replaces a language switcher. Routes and URLs You might want to localize route...
...are of course much more significant with real / more complex code. What are the benefits of more modular code? Code is written once but read often (by your future self...
...that does net yet exist Sometimes it can be easier to find out the best API of a class by using that code first from the place that will be...
ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
If you want a widget for awesome that runs a command regularly (every X seconds) and puts the output into...
If you have a replication error with MySQL and you know the "error" is okay (e.g. you've executed the...
...Cumulative Layout Shift score should be good' do # Cumulative Layout Shift seems to be better in tests than in reality, so # we use a lower value than the official "good...
...element.offsetHeight > 0; Or maybe you'd even like to patch Prototype so it behaves like jQuery: Element.addMethods({ visible: function() { return offsetWidth > 0 && offsetHeight...
WProofreader is a spelling and grammar checking tool that integrates with textareas and numerous WYSIWYG editors. While it usually activates...
If you see a stacktrace beginning with lines like this: E, [2015-07-16T09:23:10.896146 #23308] ERROR -- : app error: "incompatible marshal file format (can't be read)\n...