Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Heavyblade / rental_program.rb
Created February 12, 2024 22:09
rental_program
class Customer
attr_reader :name, :rentals
def initialize(name)
@name = name
@rentals = []
end
def add_rental(arg)
@rentals << arg
@Heavyblade
Heavyblade / herramientas.md
Created December 21, 2022 14:29
herramientas.md

Sharp your Tools


Editor

  • Neovim (Obviously !!)
  • Telescope
  • LSP (SolarGraph + RuboCop)
  • Harpoon + Hop
  • Fugitive
let mapleader=","
set encoding=utf-8
set hidden
set nowritebackup
BANNER_MIN_HEIGHT = 500
BANNER_MIN_WIDTH = 1700
run_reports: { all: true, domo: true, legacy: true, dynamic: false},
def policy(scope)
Pundit.policy(current_user, scope)
end
# frozen_string_literal: true
module Setup::React
def activities_links
[
channels_link,
activity_series_nav_link,
campaign_templates_nav_link,
campaigns_nav_link,
<ul>
<% activities_links.each do |link| %>
<%= link %>
<% end %>
</ul>
actions = Act.where(brand_id: brand_id)
.joins(:campaign)
.includes(:act_requirements, campaign: :channel)
.without_deleted
describe "When updating privacy policy on an non defult locale" do
let(:brand) { create(:brand, :with_legal_documents, text_translations: { "en-US" => "en US", "en-AU" => "en AU"}) }
let(:privacy_policy_attributes) do
{ "0" =>
{
"id" => brand.current_privacy_policy.id,
"text_translations" => { "en-AU" => "en-AU updated" },
"document_type" => "privacy_policy"
}
}