Skip to content

Instantly share code, notes, and snippets.

@mnishiguchi
mnishiguchi / rails_friendly_forwarding.md
Last active April 29, 2024 13:25
Rails, Devise - Friendly forwarding after sign in or log in
@timabell
timabell / sourced.ai spam.md
Last active December 8, 2016 15:57
unsolicited mail by farming my OSS publications. douchebags.

completely irrelevant, if they'd bothered to actually look they'd have known that. reading github doesn't make your automated spam bullshit any more acceptable. wankers.

Oh and pick one domain and stick to it ffs. Idiots. Which is it, http://sourced.ai/ or http://sourced.tech/

I don't mind people (humans) reading my published stuff and contacting my personally, but the below is unacceptable.

From your webshite:

We send highly relevant job proposals to the suggested profiles and inform them about all the aspects of the position.

@mdkalish
mdkalish / rails custom name associations
Last active February 20, 2023 12:58
Generate models with associations using rails generators, enabling custom class_name, foreign keys, and indices.
Here's how it flows:
1. Create models:
```
rails g model User name --no-test-framework --no-assets
rails g model Post content --no-test-framework --no-assets
rails g model Address city --no-test-framework --no-assets
```
@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active May 28, 2024 17:41
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems: