Skip to content

Instantly share code, notes, and snippets.

View RyanChrisSmith's full-sized avatar

Ryan Smith RyanChrisSmith

View GitHub Profile
@Penitent0
Penitent0 / factorybot_faker_demo.md
Created September 15, 2022 22:00 — forked from jfangonilo/factorybot_faker_demo.md
FactoryBot/Faker Demo

FactoryBot/Faker Demo

For Turing BE Mod2 - MiniShop

https://github.com/turingschool-examples/mini_shop

Are you sick of writing fake data for tests? If you are, then your test files probably look something like this. This is what your index spec probably looks like for a project like MiniShop. You create 3 merchants and 3 items for each merchant and make sure those items show up on your index page...

#index_spec.rb
require "rails_helper"
@jfangonilo
jfangonilo / factorybot_faker_demo.md
Last active November 16, 2023 04:28
FactoryBot/Faker Demo

FactoryBot/Faker Demo

For Turing BE Mod2 - MiniShop

https://github.com/turingschool-examples/mini_shop

Are you sick of writing fake data for tests? If you are, then your test files probably look something like this. This is what your index spec probably looks like for a project like MiniShop. You create 3 merchants and 3 items for each merchant and make sure those items show up on your index page...

#index_spec.rb
require "rails_helper"
@cdesch
cdesch / rails_generator_cheat_sheet.md
Last active May 15, 2024 13:40
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.