developer.mozilla.org

...full UTF-8 space, not just Latin/ASCII. For example, a password policy matcher might include regular expressions like [A-z] or [0-9], but those do not match e.g. German...

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...

...flag trait from the card above, you can drop the does_flag trait the includes in all your models Note that the following code from the does_flag trait is...

...using a callback. before_initialize :set_newsletter private def set_newsletter return unless [nil, ''].include?(receive_newsletter) self.receive_newsletter = (user.role == 'customer') end Note: When using active_type, the attribute method...

...with many built-in functions to manipulate color. Some of the more interesting functions include: adjust-hue($color, $degrees) Changes the hue of a color. lighten($color, $amount)

...path with e.g. url_for (excluding :host and similar). Note that it does not include query parameters. Use params.to_unsafe_h returns a HashWithIndifferentAccess with everything from params. If none...

...of the project? Do you have to correct further estimates accordingly? Our estimates always include a percentage markup for organization and project management anywhere between 10% and 30%.

...must only differ in their conditions (#where, #having). If either side has a #join, #includes, etc., it will throw an error: authorized_users.and(filtered_users.join(:account)).to_sql # => ArgumentError: Relation passed to...

@cards = Card .where(...) .preload(:user, :deck) .to_a end end You can include strict_loading somewhere in the scope chain: class CardsController < ApplicationController def index @cards = Card

...access to some path methods generated by your routes. Even though you could technically include Rails.application.routes.url_helpers, this may include way too many methods and even overwrite some class methods...

...an escape sequence like this: echo -en "\033]0;Hello\a" You can easily include the current path: echo -en "\033]0;$(pwd)\a" Or, to replace your home directory...

...Product owner (PO): with the customer Developer Development Take responsibility for their stories. This includes always gathering all necessary information from the project lead or the PM, communicate blockers, make...

...engineering with the customer Create stories with the project lead Communicate with the customer, including tunneling questions of developers (or have them talk to the customer directly, if required)

...new gem named memoized. memoized is API-compatible to memoizer, you just need to include Memoized instead of Memoizer: class A include Memoized memoize def hello 'hello!' end

github.com

ruby-warning adds custom processing for warnings, including the ability to ignore specific warning messages, ignore warnings in specific files/directories, include backtraces with warnings, treat warnings as errors, deduplicate warnings...

makandra dev
unpoly.com

...noticable on pages with many elements, or many forms. To address this, this release includes a number of performance fixes: Fix a performance regression where Unpoly would track the DOM...

makandra dev

...nonwords: false }], '@stylistic/spaced-comment': ['error', 'always', { line: { markers: ['*package', '!', '/', ',', '='] }, block: { balanced: true, markers: ['*package', '!', ',', ':', '::', 'flow-include'], exceptions: ['*'] } }], '@stylistic/template-curly-spacing': ['error', 'never'], '@stylistic/template-tag-spacing': ['error', 'never'], '@stylistic/wrap-iife': ['error', 'any', { functionPrototypeMethods: true }], '@stylistic/yield-star-spacing': ['error', 'both...

...necessary, because you now load those libraries through esbuild. adapt your app/assets/config/manifest.js file to include only the folders that sprockets needs to take care of, e.g.: //= link_tree ../builds/

...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...

...the file structure on disc. A general approach Part A: Create a commit which includes a script that allows you to copy the existing file to the new file structure...

Undoing a broken text is very hard or impossible. The text can include any type of file link (e.g. link to profile image) and not only image links...

makandra dev
gist.github.com

...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...

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...

...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...

...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...

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...