- Nov 2023
-
guides.rubyonrails.org guides.rubyonrails.org
-
However, depending on your taste, that just might not feel right to you. You might prefer that app/services/users/signup.rb simply defines Services::Users::Signup.
-
- Jul 2023
-
stackoverflow.com stackoverflow.com
-
ActiveStorage::LogSubscriber.detach_from :active_storage
It's nice that it's that easy to "opt out" of the default provided log subscriber and (if desired) swap in your own custom one that does whatever you want.
-
- Jan 2023
-
guides.rubyonrails.org guides.rubyonrails.org
-
You can use ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags to configure pg_dump. For example, to exclude comments from your structure dump, add this to an initializer: ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags = ['--no-comments']
-
- Dec 2022
-
edgeguides.rubyonrails.org edgeguides.rubyonrails.org
-
That may be fine, but if you prefer you can also pass overrides to the inflectors used by the autoloaders: # config/initializers/zeitwerk.rb Rails.autoloaders.main.inflector.inflect("vat" => "VAT") Copy With this option you have more control, because only files called exactly vat.rb or directories exactly called vat will be inflected as VAT. A file called vat_rules.rb is not affected by that and can define VatRules just fine. This may be handy if the project has this kind of naming inconsistencies.
-
- Sep 2022
-
github.com github.com
-
The RuboCop way is to offer an opinion in the way of a good default, but to accommodate all reasonable style choices.
-
-
www.postgresql.org www.postgresql.org
-
Otherwise behaves according to the value of null_value_treatment which must be one of 'raise_exception', 'use_json_null', 'delete_key', or 'return_target'. The default is 'use_json_null'.
-
- Aug 2022
-
github.com github.com
-
You can pass any options to puma via the server setting Capybara.server = :puma, { queue_requests: true }
-
- Sep 2021
-
github.com github.com
-
Yeah I don’t think we will find something that works for everyone in all cases. But Webpacker is quite flexible with the setup it has now. Easy to change!
-
- Mar 2021
-
github.com github.com
-
Or if you need to change the way the string is assembled, you can provide a proc, for example: if defined?(BetterErrors) BetterErrors.editor = proc { |file, line| "vscode://file/%{file}:%{line}" % { file: URI.encode_www_form_component(file), line: line } } end
-
-
bugs.chromium.org bugs.chromium.org
-
This is a huge disadvantage to all web developers. Why can't we at least have the ability to turn validation messages off? Why do we have to re-implement a validation system when you already have one in place, but all we want is the validation aspect and not the built in messaging? By taking away the ability to style elements that CHROME adds to the browser window, it is hurting developers professional appearance. We just want to use Chrome's WONDERFUL validation system with our own error messages. Either let us style them, or let us hide them, but don't make us re-invent the wheel just because you don't want our code to be "browser specific". Writing a new validation system just for Chrome is going to be much more "browser (chrome) specific" code than setting "::-webkit-validation-bubble, ::-webkit-validation-bubble * { display: none; }. This isn't just an annoyance, it's a huge disadvantage to any developer who wants to easily utilize Chrome's built in validation. I usually brag about how wonderful Chrome is, but I'm starting to think it's heading in another direction...
-
-
-
-
github.com github.com
-
Configurable syntax! You can add new rules and even replace existing ones.
-
-
trailblazer.to trailblazer.to
-
or even configure its taskWrap
-
- Feb 2021
-
github.com github.com
-
initialize(model) accepts an instance of the model that the form represents.
By designing this so there is a main model, it isn't as flexible as Reform's "Composition" module that lets you compose it in any way you want, including having as many as you want top-level "main" modules that your form is comprised of.
Tags
Annotators
URL
-
- Jan 2021
-
github.com github.com
-
premailer-rails and premailer require a gem that is used to parse the email's HTML. For a list of supported gems and how to select which one to use, please refer to the Adapter section of premailer. Note that there is no hard dependency from either gem so you should add one yourself.
Tags
Annotators
URL
-
- Nov 2020
-
marcin-piela.github.io marcin-piela.github.io
-
react-fetching-library allows to use custom fetch implementation so it's doable to use this library with AXIOS.
-
-
-
In Angular CLI 6 this command has been removed, and it will not come back. Instead there is a new concept called Builders.With the new Angular CLI you can customize the build process by defining your own builders as well as using one of the builders provided by the community.
Why did they remove it if it was useful? They wanted people to be stuck in Angular CLI world? Couldn't they still provide that escape route / migration path for those that really do need/want to eject?
-
In Angular CLI 1.x (Angular 5) you had ng eject command for this, which was ejecting the whole underlying webpack configuration and allowing you to modify it as you please.
-
- Oct 2020
-
-
To silence circular dependencies warnings for let's say moment library use: // rollup.config.js import path from 'path' const onwarn = warning => { // Silence circular dependency warning for moment package if ( warning.code === 'CIRCULAR_DEPENDENCY' && !warning.importer.indexOf(path.normalize('node_modules/moment/src/lib/')) ) { return } console.warn(`(!) ${warning.message}`) }
-
- Sep 2020
-
medium.com medium.com
-
The benefit of this approach is that rather than having these defaults and fighting against them, it’s fully up to you to decide how to handle everything.
-
-
github.com github.com
-
Then, the projects that use these libraries get to process these import statements how they like when they are bundled. For the ones that wish to load jQuery from a global, we again mark 'jquery' as an external—since we still don't want Rollup to bundle jQuery—and as a global.
-
-
github.com github.com
-
Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
Tags
- ugly/kludgey
- run-time dynamicness/generics vs. having to explicitly list/hard-code all options ahead of time
- forced to fork/copy and paste library code because it didn't provide enough customizability/extensibility / didn't foresee some specific prop/behavior that needed to be overridable/configurable (explicit interface)
- forking to add a desired missing feature/change
- workarounds
- maintenance burden to explicitly define/enumerate/hard-code possible options (explicit interface)
- Svelte: how to affect child component styles
- trying to prevent one bad thing leading to people doing/choosing an even worse option
- component/library author can't consider/know ahead of time all of the ways users may want to use it
Annotators
URL
-
- Jun 2020
-
-
thanks @nateberkopec for making terminal-table so configurable
Tags
Annotators
URL
-
- May 2020
-
docs.gitlab.com docs.gitlab.com
-
In a basic configuration, GitLab runs a pipeline each time changes are pushed to a branch. If you want the pipeline to run jobs only when merge requests are created or updated, you can use pipelines for merge requests.
-
- Apr 2020
-
github.com github.com
- Apr 2017
-
bost.ocks.org bost.ocks.org
-
var myChart = chart().width(720).height(80); Modifying an existing chart is similarly easy: myChart.height(500); As is inspecting it: myChart.height(); // 500 Internally, the chart implementation becomes slightly more complex to support getter-setter methods, but convenience for the user merits additional developer effort! (And besides, this pattern becomes natural after you’ve used it for a while.) function chart() { var width = 720, // default width height = 80; // default height function my() { // generate chart here, using `width` and `height` } my.width = function(value) { if (!arguments.length) return width; width = value; return my; }; my.height = function(value) { if (!arguments.length) return height; height = value; return my; }; return my; } To sum up: implement charts as closures with getter-setter methods.
-