Skip to content

Instantly share code, notes, and snippets.

@mathildathompson
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save mathildathompson/9655211 to your computer and use it in GitHub Desktop.

Select an option

Save mathildathompson/9655211 to your computer and use it in GitHub Desktop.
rails g migration create ingredient_recipes
#In a join table we want it not to create an id, it only needs 2 columns;
create table :ingredicnets_recipes, :id => false
\d ingredients_recipes
# The resources should be plural at all times; #If you make a get request to '/' recipes it should show you all the recipes;
rm app/views/*/create.html.erb #delete from any folers inside views
rm app/views/*/destroy.html
ctrl + shift + . #erb tags; #Need sublime erb plugin;
*= require tree . #refers to the stylesheet folder; #It will require all off your stylesheets and compile them in the asset pipeline;
#In the layout include a link_tag to the application.css; The application.css then says go and require all of the other files in the system;
#In production all of your stylesheets will be rolled into one file;
#In scss you can have mixins which is variables and you can also have loops;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment