...version of the same dependency. It can be useful as it allows you to include two libraries that would otherwise not be compatible, e.g. when one relies on jQuery...
...automatically installed packages that no other packages depend on any more. This, of course, includes obsolete kernel versions, with the explicit exception of the currently running kernel, the kernel version...
...functionality to a a new controller, not the movies controller. The movie/actor association should include an attribute for the name of the played character You only need very basic styling...
...Use a test harness A test harness is a Ruby module that you include in the Cucumber world. This way the module's methods become available to all step definitions...
Modern JavaScript includes Intl.NumberFormat to format numbers in different formats and locales. In this card, we describe a wrapper for it that humanizes a given number of seconds in the...
...of all commands in the byebug guide The linked cheatsheet at the bottom also includes some examples and all the aliases to every command with a different useful structuring of...
...need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib...
--srcdir=. --curdir --ruby=/home/user/.rbenv/versions/1.9.3-p551/bin/ruby --with-ruby-dir --without-ruby-dir --with-ruby-include --without-ruby-include=${ruby-dir}/include --with-ruby-lib --without-ruby-lib=${ruby-dir}/lib...
If you need to use safe_join() in a model, you need to include ActionView::Helpers::OutputSafetyHelper. Rails 2 Roll a custom join method that is aware of Rails...
...If you are using terminator, bin/term is the easiest way to to achieve this. Include the byebug gem in your Gemfile. This provides debugging for your app.
...seems to be really eager to maintain the library it requires no configuration (just include it to your page), but offers a powerful API it was written to be performant...
...Corresponding Rails Guide Controller generators Rails ships with a ResourceHelpers module. Require 'rails/generators/active_model' and include Rails::Generators::ResourceHelpers inside your generator class to have some helpers at hand, i.e. controller...
...use "git restore --staged ..." to unstage) deleted: app/assets/stylesheets/pagination.sass Untracked files: (use "git add ..." to include in what will be committed) app/assets/stylesheets/pagination.sass Now use fixup to add the commit to delete...
...for full-stack integration testing. Try and use it Your forked MovieDB should already include a feature that uses a real browser. Add the @javascript tag to your other features...
...a Rails application, your code base will grow a collection of different file types including: Ruby (business logic) HTML fragments (layouts and views) CSS/Sass/SCSS (styles) JavaScript (client-side behavior)
...how can we define a "manifest" or "pack" that defines which files should be included in the build? Can our JavaScripts use import or require to load another file? Fingerprinting...
PostgreSQL, unlike MySQL, treats strings as case sensitive in all circumstances. This includes comparison with = and LIKE collision detection in unique indexes Usually this is fine, but some strings (like...
...difference between class methods and instance methods (def self.method vs. def method) Modules and include Code blocks ("procs", "lambdas") Input and output Simple regular expressions Resources Tutorials
...a few minor changes. If you have the vcr and webmock gems installed, simply include: # spec/support/vcr.rb VCR.configure do |c| c.cassette_library_dir = Rails.root.join("spec", "vcr") c.hook_into :webmock end RSpec.configure...
...bar' # same thing h['foo'] # => 'bar' h.foo # => 'bar' in? (> 3.0 only) reverse of Array#include? characters = ["Konata", "Kagami", "Tsukasa"] "Konata".in?(characters) # => true Array.wrap wraps argument in an array, unless...
Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts
...versions. In this bonus chapter, we want to dive deeper. Common web apps often include static images like icons and application logos next to the dynamically created images versions of...
Read the card Before you make a merge request: Checklist for common mistakes Include the checklist in the description of all future merge requests and try to tick all...
mso-line-height-rule: exactly; line-height: 0; } Make sure to include mso-line-height-rule: exactly. Otherwise, MS Outlook will treat your line-height as a minimum...
In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you...
...database-specific tool like pg_dump, you can now serialize every single schema property, including proprietary features. Unfortunately using structure.sql comes with some disadvantages. Why structure.sql can churn wildly
...lot of noise and merge conflicts in your repository. Possible reasons for this churn include: Two developers use different versions of the database server (e.g. PostgreSQL 16 vs. 17).