$ rails g model User
belongs_to
has_one
| /** | |
| * requestAnimationFrame polyfill by Erik Möller & Paul Irish et. al. | |
| * https://gist.github.com/1866474 | |
| * | |
| * http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| * http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| **/ | |
| /*jshint asi: false, browser: true, curly: true, eqeqeq: true, forin: false, newcap: true, noempty: true, strict: true, undef: true */ |
| # Shortcut for `bundle exec rails` and `bundle exec rake`. | |
| # If bin/rails and bin/rake are available, use them instead as they are much | |
| # faster to execute than `bundle exec`. | |
| function r() { | |
| if [[ "g|generate|c|console|s|server|db|dbconsole|r|runner|new" =~ $1 ]]; then | |
| if [ -x bin/rails ]; then | |
| bin/rails "$@" | |
| elif [ -x script/rails ]; then | |
| script/rails "$@" | |
| else |
| ## Prepare ################################################################### | |
| # Remove RVM | |
| rvm implode | |
| # Ensure your homebrew is working properly and up to date | |
| brew doctor | |
| brew update | |
| ## Install ################################################################### |
For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.
There is also reference documentation in the works.
CSS Systems
| INSTALL | |
| ======= | |
| $ gem install rspec | |
| RSPEC-RAILS | |
| =========== | |
| RAILS-3 | |
| ======= |
| import sublime, sublime_plugin | |
| import os | |
| class DetectFileTypeCommand(sublime_plugin.EventListener): | |
| """ Detects current file type if the file's extension isn't conclusive """ | |
| """ Modified for Ruby on Rails and Sublime Text 2 """ | |
| """ Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """ | |
| def on_load(self, view): | |
| filename = view.file_name() |
| ### | |
| ### YAML Showcase | |
| ### Thanks for http://jp.rubyist.net/magazine/?0009-YAML | |
| ### To run: | |
| ### cat $0 | ruby -r pp -r yaml -e 'pp YAML.load STDIN.read' | |
| ### | |
| collection: | |
| mapping(block-style): | |
| name: Taro | |
| age: 32 |