'no': 'Nope' There's actually a long list of reserved words with this behavior: y|Y|yes|Yes|YES|n|N|no|No|NO |true|True|TRUE|false|False...

Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any automated tests which try to interact with unload prompts will...

...such dialogs. This means that we want to use the BiDi driver when testing beforeunload prompts. Enabling the BiDi WebDriver Using Capybara, simply set the :web_socket_url option to...

You must reconfigure the guest so it will get its own IP address: Shutdown the guest In the guest's...

...feature of Bundler. It might be an unintended side effect of something else. I believe this command will try to update GEMNAME and GEMNAME only. If this leads to unmatched...

makandra dev

Sometimes sound breaks for me and speaker output is completely broken. This helped: pulseaudio -k && sudo alsa force-reload

We're adding a script console-for to open a remote Rails console with one command. Also have a look...

If you defined your association via class Article belongs_to "category" end and you try Article.scoped(:include => :category) you will get an error message in `preload_one_association': Association named...

...you misspelled it? (ActiveRecord::ConfigurationError) Solution Always define your assocations via symbol class Article belongs_to :category

When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...

It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...

You can find out about disk space usage of all tables within your database by running this: SELECT table_name...

A popular ruby idiom I keep stumbling upon is def do_some_thing_for(values) values = Array(values)

geekytidbits.com

To retrieve only unique combinations of the selected attributes: You can omit rows, where all selected columns are equal with...

To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11...

makandra dev

For webpages to load fast it's recommended to optimize images. Ideally an image's file size should be as...

To apply transparency to an element, you can use opacity in CSS. However, sometimes you don't want to make...

Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that...

github.com

...rendering quality is now fine in recent versions of wkhtmltopdf (0.12+). You will never beat LaTeX if you need perfect font rendering. If you are observing strange behavior when including...

...might experience that your application "locks up" whenever you request a .pdf route. This behavior is caused by a deadlock: The Rails process is trying to render the page to...

Rubygems can produce lots of deprecation warnings, but sometimes, you cannot fix them. To have a tidy terminal with output...

If you have many connections to your MySQL or MariaDB (as we have) you might want to filter the list...

...won't need this for single lines of text. In this case it is better to just use the text-overflow property: Use CSS "text-overflow" to truncate long texts...

...starts wrapping within its container. This is most probably because there is no defined behavior in case multiple text contents are rendered next to each other (horizontally) and the clamping...

def self.acquire(name) already_acquired = definitely_acquired?(name) if already_acquired yield else begin create(:name => name) unless find_by_name(name) rescue ActiveRecord::StatementInvalid # concurrent create is okay...

begin result = nil transaction do find_by_name(name, :lock => true) # this is the call that will block acquired_lock(name) result = yield end result ensure maybe_released_lock...

...one to correct yourself. Instead, simply press the up key (↑). The message area will become yellow and contain your previously sent message. Make any changes and submit again.\

github.com

Then the "sorted" select should be sorted But the "unsorted" select should not be sorted

around do |example| superuser_power = Power.new(create(:user, :superuser)) Power.with_power(superuser_power) do # before-block will be run here, DB snapshot will be created example.run # after-block will...