You should avoid using application models in your migrations. But how else could you create records in a migration?
...version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" yarn-deduplicate will help you with that and merges the two entries above: "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658...
By default most exceptions in Rails will render a 500 error page and will create a new issue in your...
...as an environment variable named STAGE: set :whenever_command_environment_variables, ->{ fetch(:default_env).merge(rails_env: fetch(:whenever_environment), stage: fetch(:stage)) } You may now access ENV['STAGE'] in...
...CI pipeline but no CD, you might find yourself frequently waiting for CI (with "merge after pipeline succeeds") just to perform the deployment. The following command waits for the next...
...just copy the folder into your working copy and try a commit without a merge because Subversion will die on you. Work on ./branches/$ticketnumber_shortdesc. If you work on...
...a long story it is useful to sometimes merge the trunk into your branch so there will be less pain later: svn merge https://dev.makandra.de/svn/filepanic/trunk ./branches/$ticketnumber_shortdesc.
...into .browserslistrc in your project's root directory Look at the default webpacker.yml and merge any changes to your project's webpacker.yml. Add extract_css: true to the default section...
...marked": "0.3.2", "select2": "./vendor/asset-libs/select2", }, "devDependencies": { "webpack-dev-server": "3.x" }, "resolutions": { "jquery": "2.2.4" } } 6. Merge the content of the application.js and application.css to the app/webpack/packs/application.js. You can also import the...
...can use them in your .gitlab-ci.yml in your project. To limit test runs to merge requests and the master branch, you can write this: tests: script: bundle exec rake tests...
- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event...
Merging .po-files with Git is painful. There have been attempts of making Git more clever when trying to merge .po-files. I believe however that this is not enough...
...in different branches at the same time. In order to not accidentally produce invalid merges I additionally disable merging for po files altogether, by adding the following .gitattributes file to...
...git pull origin other-branch If you keep rebasing by default, you can get "merge pulls" like this: git pull --no-rebase origin other-branch
...deeper than 1 level: options = params.merge(:include => { :user => :avatar }) Post.paginate options When inspecting the merged params you will get something like this: { :include=> { "user" => :avatar }, :page => 23 } Here the :user...
end context 'when trying to set a disallowed title' do let(:attributes) { super().merge(title: 'Hello') } # <== it 'will not save' do expect(subject.save).to eq(false) end end
If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...
...feature branches, they will stack up if you don't delete them after the merge to master. Here's how to tidy them up. Delete feature branches Find already-merged...
...branches by running # On branch master git branch --merged You may safely delete each of the listed branches, because they point to commits that are contained in the history of...
There are several ways to merge two (or more) PDF files to a single file using the Linux command line. If you're looking for graphical tools to edit or...
...manipulating PDF documents. You may need to install it first (sudo apt install pdftk). Merging multiple files works like this: pdftk one.pdf two.pdf cat output out.pdf Unlike pdfjam, PDFtk should...
...push -o ci.skip This has a few cavates: Skips only branch pipelines and not merge request pipelines. This does not skip pipelines for CI/CD integrations, such as Jenkins...
You know that you can force absolute URLs throughout a response. Now you want to modify URLs similarly, but only...
...link) } # use for bulk indexing # index these fields def search_data attributes.slice( 'title', 'url', ).merge( body: html_to_text(body_html), user: { name: user&.name, }, acl_group_ids: channel&.group...
...hash.merge!(hash) do |key, old_value, new_value| # Return something end The block of merge! will be called whenever a key in the argument hash already exists in the base...
...you like (by returning old_value you'd get the behavior of Rails' reverse_merge!, by returning new_value you'd get the behavior of standard merge!). Note that there...
So you didn't listen and here it comes: Ignore the Mail Merge Wizard. It will crash or destroy your document. Export your addresses, recipient names, etc. as...
...now insert placeholders for a column value. Use menu Insert => Field => More fields... => Mail Merge Fields. Select the address book database you imported earlier. Pick the column you want. Insert...
...bundling, and even segfaults. Use this card to fix these issues. When tests pass, merge to master and delete the CI branch. Replace the Travis CI badge in the README...
...team can still keep up the development pace because developers concentrate on specific components. Merge requests target a specific component. Advantages over a distributed application setup (multiple repositories, multiple applications...
...Everything is still deployed at once. No need to orchestrate branch merges and deploys across N repos. Other resources https://www.airpair.com/ruby-on-rails/posts/ruby-on-rails-the-modular-way https://engineering.gusto.com/building-toward-a-modular-monolith https://railsconf.com/2020/video/vladimir-dementyev-between-monoliths-and-microservices
...YAML-doc, e.g. when writing Rails locale files. Did you know that ... << is a merge key (similar to & in SASS) there are variables, called aliases. Definition: &alias Some content, usage...
Caveats Specifying a key twice does not merge the sub keys, but override the first definition, e.g. de: car: # overridden door: Tür wheel: Rad car: # only this is used...