Rails command for generating a Model with columns and references
10/30/14 Public, Command Line, Rails General
$ rails generate model User name:string age:integer vote:references post:references
the model name is Capital and singular (i.e. User)
Use vote:references
and post:references
in your generator to add the foreign IDs into User table, to...
1 vote - harrylevine
Ways to create test email addresses
10/28/14 Public, Tricks, Testing / TDD
1) You can add a “+” sign right after your email prefix, and then add anything after that, between the + and the @, and it will create unique test emails address. All of which will be emailed to your original address.
For example, if your emai...
1 vote - harrylevine
Applying a focus during rspec testing to test just one specific area
11/24/14 Public, Command Line, Testing / TDD
add , focus: true
on the area to be tested. You can use any word here, instead of focus. (i.e. foobar)
Then to run the rspec on just that focussed area you type in...
1 vote - harrylevine
How to run a spec / test when there is a time latency or lag involved
10/28/14 Public, Testing / TDD, Gems
For example, if something is supposed to automatically delete every 7 days, how do you test for that?
Two ideas
created_at
data in the database to back date an item, simulating it was created 7 days ago...
1 vote - harrylevine
Website for testing web apps in multiple browsers
10/28/14 Public, Online Resources, Testing / TDD
1 vote - harrylevine
Shortcut for finding recent things you have typed on the command line
10/28/14 Public, Command Line, Shortcuts
1 vote - harrylevine
HTML symbol for creating one blank space
03/22/15 Public, Other Languages
For example, here are two spaces:
1 vote - harrylevine
Website and way to create a favicon for the browser tab
10/28/14 Public, Online Resources
Simply add this to the <head></head>
section of your layouts:
<%= favicon_link_tag 'favicon.ico' %>
Place the favicon.ico image in /app/assets/images/ if you are using the asset pipeline, and in /public/images/ if you are not.
Also, ther...
1 vote - harrylevine
Sublime shortcut for inserting a line above your current location with proper indentation
10/27/14 Public, Shortcuts
On a mac:
command + shift + return
1 vote - harrylevine