Skip to content

Instantly share code, notes, and snippets.

View apaciuk's full-sized avatar
🎯
Focusing

Paul Anthony McGowan apaciuk

🎯
Focusing
View GitHub Profile
@apaciuk
apaciuk / Faker.rb
Last active February 20, 2023 09:38
Ruby Faker examples #ruby #rails #faker
require 'faker'
# Create just users
100.times do
user = User.new(
first_name: Faker::Name.name_with_middle,
last_name: Faker::Name.name_with_middle
email:Faker::Internet.free_email
password: Faker::Internet.password
)
user.save!
@apaciuk
apaciuk / Devise Snippets
Last active April 9, 2022 08:34 — forked from Deanout/Devise Snippets
Devise Snippets
bundle add devise
bundle install
rails g devise:install
class TurboDeviseController < ApplicationController
class Responder < ActionController::Responder
def to_turbo_stream
controller.render(options.merge(formats: :html))
rescue ActionView::MissingTemplate => error
Layout/AccessModifierIndentation:
Enabled: true
Layout/AlignHash:
Enabled: true
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: always_inspect
Layout/AlignParameters:
Enabled: true
@apaciuk
apaciuk / RAILS_CHEATSHEET.md
Created July 17, 2021 07:36 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before