...some benefits over placing fonts into your repo: All font weights and glyphs are included. You don't need to download and add files for latin, greek, cyrillic, or other...

...contain different unicode-range values which map different font files to the glyphs they include. This means that e.g. the file for cyrillic glyphs is only loaded when any text...

...Lockstep.synchronize end end Note that this method uses capybara-lockstep in the last line. Include this module in your test suite and call conclude_browser_requests at the end of...

...you have the following code: module Mod def foo @@foo end end class Klass include Mod end @@foo does not mean Klass::@@foo (qualifier added to make my point; it...

...Ruby expression). It actually means Mod::@@foo and is shared between Mod, all classes including Mod as well as all their subclasses. Also note that only the class and module...

makandra dev

...them like this: *, :before, :after { transition-property: none !important; animation: none !important; } To only include these styles for tests, see Detect the current Rails environment from JavaScript or CSS.

...a list of acceptance criteria and (optionally) some additional notes. The introduction sentence should include the role of the user, what the user wants and why. The acceptance criteria are...

...your particular development server shows an error. Warning Unpoly cannot repeat form submissions that include file inputs. If it tries, the file data will be replaced with the string [object...

...To avoid confusion, this code will instead redirect to /__better_errors when a file is included in the submission. // Only do this in development. This requires a `[data-environment="development"]` attribute...

thepugautomatic.com

...See https://thepugautomatic.com/2013/07/dsom/ module WithModuleInheritance def with_module_inheritance(&block) anonymous_module = Module.new include anonymous_module anonymous_module.module_eval &block end end Module.include(WithModuleInheritance...

4 0 - 5 Dev machines are not blocked on test runs; Code Reviews include test badge; Automatically merge a PR on green tests Upgrade Rails 5 0 - 5

...client: Make a POST request with method override The default configuration Rails and Sinatra includes a Rack middleware that lets you control the HTTP method used for routing by POSTing...

makandra dev
relishapp.com

...in an error like does not implement: current_power. The documentation on dynamic classes includes some ways to fix this by showing how dynamically defined attribute methods from ActiveRecord are...

getbootstrap.com

...BS 2+3, but not above there are some forks which say that they include a BS4 renderer, but they didn't work for me. Suggestion: Remove simple-navigation and...

...or overwrite the styles by using bootstrap variables. Upgrade Phase 1 First you should include the new version into your project and replace the old imports, e.g. with webpack

...then((latitude) => { done(latitude) }) JS expect(returned_latitude).to eq latitude end When we include this step into a scenario and run it, it will fail because StreetMap is not...

...this for packages like jQuery. Otherwise the jQuery library attached to window might not include the functions of your packages that depend on jQuery. Note: This is only an issue...

...within the application. Background By default yarn will create a folder node_modules that includes all packages and their dependencies. In the example below we see two packages of jQuery...

...power that specifies which deals and documents are accessible by a user: class Power include Consul::Power power :deals do Deal.where(author_id: user.id) end power :documents do admin? ? Document.all...

...also need to override some methods, you can do this: class HelperProxy < ActionView::Base include ApplicationController.master_helper_module def current_user #let helpers act like we're a guest

Bare metal If you have strong nerves, you can also try to include the ApplicationController.master_helper_module directly into your model...

...config/application.rb config.action_controller.include_all_helpers = true If you cannot use this setting, your spec can include individual helper modules like this: describe 'some view', type: :view do helper SomeHelper helper OtherHelper...

render 'view_that_uses_helpers' end end Alternatively you can also explicitly include all helpers of a given controller like this: describe 'some view', type: :view do

'New bar' end end module SuperClient prepend SuperClientExtension end Test class Test; include SuperClient; end Test.foo => 'New foo' Test.new.bar => 'New bar' Good practice If you do monkey patches...

guides.rubyonrails.org

However, this approach will explain all queries for the given scope which may include joins or includes. Output will resemble your database's EXPLAIN style. For example, it looks...

...like this on MySQL: User.where(id: 1).includes(:articles).explain EXPLAIN for: SELECT `users`.* FROM `users`  WHERE `users`.`id` = 1 +----+-------------+-------+-------+---------------+ | id | select_type | table | type  | possible_keys | +----+-------------+-------+-------+---------------+ |  1 | SIMPLE      | users...

...their solution a little further to prevent the leak at its root. When you include the attached module in your ApplicationController, you can just use #prepend_view_path as before...

...versions (maybe more): Rails 4.0 - 7.0 This issue is now fixed and the fix included in Rails...

...README. Most likely you want: to add the Ruby, Rails and RSpec cops to include the unit test 2. Report all existing offenses and exclude them initially

...auto-gen-config to create a file that excludes all current violations. Your tests (including the Rubocop spec) should now all be green. Commit theses changes and consider whether you...

...application must do one thing by itself: When sending HTML e-mails, you should include a plain-text body or tools like SpamAssassin will apply a significant score penalty. Here...

chris.beams.io

...body with a blank line Limit the subject line to 50 characters (max. 72), include reference (unique story ID) to requirements tracker (Linear in our case) Capitalize the subject line...

guides.rubyonrails.org

When you're localizing a Rails application, sometimes there is this urge to include a little HTML. Be it some localized link, or a set of tags, you'd...

...like to have it included in the locale file. Example: # Locale file en: page: text: 'Please visit our corporate website to learn more about the corporation .' # HAML = t('.text')

makandra dev
api.rubyonrails.org

Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to do is implement a preview-class in spec/mailers/previews/notifier_preview.rb: class NotifierPreview...