Skip to content

Instantly share code, notes, and snippets.

View sebastian-palma's full-sized avatar

Seb sebastian-palma

View GitHub Profile
https://stackoverflow.com/questions/70868159/how-do-i-get-instance-of-a-model-with-highest-value-from-an-operation/70869517?noredirect=1#comment125324396_70869517
Director.create(first_name: "Martin Scorsese", date_of_birth: "17/11/1942", id: 2)
Director.create(first_name: "Michael Bay", date_of_birth: "17/02/1965", id: 3)
Director.create(first_name: "George Lucas", date_of_birth: "14/05/1944", id: 1)
Movie.create(name: "Star Wars: Epizoda IV – Nová naděje", release_date: "25/05/1977", description: "", director_id: 1)
Movie.create(name: "Star Wars: Epizoda III – Pomsta Sithů", release_date: "15/05/2005", description: "", director_id: 1)
Movie.create(name: "Skrytá identita", release_date: "06/10/2006", description: "", director_id: 2)
Movie.create(name: "Mizerové", release_date: "07/04/1995", description: "", director_id: 3)
# frozen_string_literal: true
module RuboCop
module Cop
module Custom
# Looks for the require of the rails_helper or spec_helper and raises
# a warning as those files are set to be included through the .rspec
# file.
#
# On auto correction it just deletes those lines.
PROMPT="%(?:%{$fg_bold[green]%}➜ ($WEZTERM_PANE):%{$fg_bold[red]%}➜ ) %{$fg[cyan]%}%c%{$reset_color%}"
PROMPT+=' $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"