...a dark background etc.) is accessible. See Barrierefreie Webseiten. It navigates through elements in order (or in an order that makes sense). You can test that by clicking into the...
...why the code looks like it does. Put comments at the right place In order to prevent comments from getting mislocated, you should choose the lowest reasonable level in the...
...have a good chance your comment will be true for a long time. In order to write a robust comment, try to stay as abstract as the chosen comment position...
...at timestamp (especially since those timestamps don't have an indefinitely high resolution). When ordering lists by timestamps, you should therefore always include a final order condition using the primary...
...key of the table. class Photo < ActiveRecord::Base scope :by_date, -> { order('created_at DESC, id DESC') } end Photo.by_date Remember to include the id field in the database index...
...often (by your future self and other developers who have to understand it in order to make changes for example). With more modular code you reduce the scope of what...
...has to be understood in order to change something. Also, naming things gives you the opportunity to convey meaning which can be especially helpful for understanding. Functions When starting from...
Fill the scenarios with your expectations & implement them. Do so in whatever order works for you. When writing code that is not covered by an integration test, add...
Fill the examples with your expectations & implement them. Do so in whatever order works for you. Whenever you notice a new requirement, add it as a new scenario...
...given character with a single one Use Tap For Better Test Data Setup let(:order) do create(:order, name: "My Order").tap do |order| create(:item, name: "Burger", order: order...
create(:item, name: "Fries", order: order, price: 2.99) end end Next And Previous Floats Float#next_float Float#previous_float Chrome On the developer console, copy data to...
...of import hoisting you may be surprised that your code runs in a different order than you see in the source file. The example below is taken from the excid3/esbuild-rails...
...window.$ is set. The broken code above will run (and fail) in the following order: import jquery from 'jquery' $('...').on('click', ...) window.jQuery = jquery window.$ = jquery The fix is to import...
...will require that file. Any other needed files need to be referenced there. In order to keep a gem's other files nice an tidy, they are usually stored in...
...follow the following guidelines (e.g. by using something like this issue checklist template). In order to reduce the number of rejects we get from clients, we want to review all...
...in a little API. This card will show you how to use it in order to create in-place file uploads with progress and a remove button.
...expected, the step won't complain. It does however expect the rows to be ordered as stated. If you don't like this, you can append "... in any order":
...I should see a table with the following rows in any order: | Bruce Wayne | Employee | 1972 | | Harleen Quinzel | HR | 1982 | | Alfred Pennyworth | Engineering | 1943 | You can find the step definition...
...the attached database_cleaner.rb to features/support/ Make sure features/support/env.rb contains the following lines in this order: # features/support/env.rb require 'features/support/database_cleaner' require 'cucumber/rails/active_record' require 'cucumber/rails/world' Cucumber::Rails::World.use_transactional_fixtures = false RSpec # spec/support/database_cleaner.rb...
...transaction and your database is therefore not cleaned properly between examples due to execution order, e.g. around do |example| superuser_power = Power.new(create(:user, :superuser)) Power.with_power(superuser_power) do...
...is out, you will need to copy this initializer into your project, in order to fix a bug in Rails 2.3.11. Run tests Deploy See the commit log for a...
...is out, you will need to copy this initializer into your project, in order to fix a bug in Rails 2.3.11. See the commit log for a detailed list of...
...default enabled), :body, :headers, :host, :path, :query). If e.g. your params have a different order, this might fail in the comparison of equality: VCR: An OAuth-compatible request matcher
...with ignored order URI ignoring query parameter ordering 1 URI ignoring query parameter ordering 2 Tests with AJAX Using javascript in integration tests might cause issues that AJAX requests are...
In modern default RSpec configurations, your tests are usually run in random order. This helps to detect "flickering" tests that only fail when run in a certain order.
...ActiveRecord::Base end class Article < ActiveRecord::Base has_many :vendors, :class_name => 'AddCurrentToVendor::Vendor', :order => 'created_at' end def up add_column :vendors, :current, :boolean Vendor.reset_column_information # reset database...
...arguments is easier for others to instantiate the class without knowing the correct attribute order in the constructor. On the other hand people try to avoid long lines and breaking...
...Data as a convenient way to define simple classes for value-alike objects. Using ordered options or open struct With some subtile differences the OrderedOptions and OpenStruct can help when...
...exceptions that are not ActiveRecord::Rollback will bubble up to the caller. Further reading Order of the state_machine callback chain and how to abort it. Rails 5 does not...
...should cover almost all transforms you need to apply in practice. Side note: transformation order With transform, transformations were applied "in order" as defined at the property, i.e. in the...
...scale, then rotate, then translate. Individual transform properties are always applied in a defined order: first translate, then rotate, then scale, then any other transform. See https://web.dev/css-individual-transform-properties/ for...
Note: This doesn't solve issues, where you want to have a specific order of after_commit actions. Documented behavior Taken from the API documentation Registers a block to...
...deliberate, and only contain changes that you really want to be in there. In order to reduce the chance to accidentally commit something you didn't intend, review your changes...
HTTP header values must only contain low-ASCII (7-bit) characters for safe transport. From RFC 7230: Historically, HTTP has...
PostgreSQL SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC LIMIT 12; schemaname | relname | n_live_tup ------------+------------------------------------------------+------------ public | images...
MySQL SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = (SELECT database()) ORDER BY table_rows DESC LIMIT 12; +---------------------+------------+ | table_name | table_rows | +---------------------+------------+ | addresses | 48106 | | orders | 33740 |
...or product manager can do that. One also has to know the application, in order to foresee edge cases and difficulties that non-developers might forget. If the project owner...