...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...
...state. You may want to modify this. Store the attached deploy.rake in lib/capistrano/tasks/, or merge the tasks with an existing deploy.rake file in that location. Hook up the Rake tasks...
If you want to make your Rails application be capable of sending SMTP emails, check out the action mailer configuration...
...go to the list of users # goes to users_path Cry no more. Just merge the following code into your features/support/paths.rb and module NavigationHelpers def path_to(page_name)
def self.to_sql(options) options = { :units => :miles, :latitude_column => 'latitude', :longitude_column => 'longitude' }.merge(options) %{ (ACOS( GREATEST(-1, LEAST(1, SIN(RADIANS(#{options[:latitude]})) * SIN(RADIANS(#{options[:latitude_column...
...you might already have code hooked up to before(:all) and after(:all), so merge it together: Spec::Runner.configure do |config| config.before(:all) do DeferredGarbageCollection.start end config.after(:all) do DeferredGarbageCollection.reconsider...
This is more tricky than it should be because url_for, asset_path, etc. all rely on different mechanisms.
...changes. Any time spent on that is well invested as it saves you rejected merge requests or any mess you need to clean up later. While you can just use...
...that importing a table overwrites an existing table. There won't be a magic merge...
...it to production with this deploy. Ask if you want to proceed. If yes, merge the master into the production branch, push and deploy with bundle exec cap production deploy...
This works well in the simplified case, when your link disappears after it was clicked. Let link_to_remote behave...
...onto your HEAD. Most often you can achieve the same result with a rebase & merge. Example: master commit1 - commit3 feature-branch \ commit2 - commit4 git checkout feature-branch git reset --hard...
...by argument-less git-pull(1) and other commands. For more information, see branch..merge in git-config...
...generated message: $ git stash Saved working directory and index state WIP on master: 77af0df Merge branch 'production' While this is okay to temporarily stash away stuff, you may want a...
You can tell git to ignore different kinds and amounts of whitespace when merging or cherry-picking. This often occurs when you changed indentation, or converted tabs to spaces.
git merge -Xignore-space-change or git cherry-pick -Xignore-space-change
...e.g. geordi dep will run the deploy command. geordi deploy Guided deployment, including push, merge, switch branches. Does nothing without confirmation. geordi capistrano Run something for all Capistrano environments, e.g...
...This tool is especially useful when you have a ton of commits after a merge and want to know the commit differences between branches...
...on a remote repository so you can pull them down and check them out, merge them into your local branches, etc. You can see the remote branches by saying
...shell, etc.) needs to be aware of Exception#cause. Nesty on the other hand-merges the stack trace array of the current and previous exception. This way Nesty does not...