This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Prepare ################################################################### | |
| # Remove RVM | |
| rvm implode | |
| # Ensure your homebrew is working properly and up to date | |
| brew doctor | |
| brew update | |
| ## Install ################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Note that scopes defined with scope will be evaluated when they are defined, rather than when they are used. For example, the following would be INCORRECT!!!: | |
| scope :published, | |
| where(:published => 1) | |
| .where(:hidden => 0) | |
| .where("publish_date <= ?", Time.now) | |
| The example above would be "frozen" to the Time.now value when the model class was defined, and so the resultant SQL query would always be the same. The correct way to do this would be via a lambda, which will re-evaluate the scope each time it is called: | |
| scope :published, -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
| 1.) Open any application | |
| 2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
| 3.) Release Power button | |
| 4.) Press and hold Home button Lightly | |
| until screen returns to icon screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function login() { | |
| var email = $('#user_email').val(); | |
| var password = $('#user_password').val(); | |
| var data = {remote: true, commit: "Sign in", utf8: "✓", | |
| user: {remember_me: 1, password: password, email: email}}; | |
| $.post('/users/sign_in.json', data, function(resp) { | |
| if(resp.success) { | |
| // process success case | |
| } else { | |
| // let the user know they failed authentication |
NewerOlder