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
| # app/controllers/users/password_controller.rb | |
| class Users::PasswordsController < Devise::PasswordsController | |
| def resource_params | |
| params.require(:user).permit(:email, :password, :password_confirmation) | |
| end | |
| private :resource_params | |
| end |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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
| ### Install OpenJDK | |
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| ### Download and Install ElasticSearch | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.deb | |
| sudo dpkg -i elasticsearch-1.3.1.deb |
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
| // use the built-in ios linguistics functionality to stem the tags | |
| + (NSMutableArray *)stemTags:(NSMutableArray*)originalTags { | |
| NSLinguisticTagger *tagger = [[NSLinguisticTagger alloc] | |
| initWithTagSchemes:[NSArray arrayWithObjects:NSLinguisticTagSchemeLemma, nil] | |
| options:(NSLinguisticTaggerOmitWhitespace | NSLinguisticTaggerOmitPunctuation)]; | |
| NSMutableArray *stemmedTags = [[NSMutableArray alloc] init]; | |
| // convert tags to string | |
| [tagger setString:[originalTags componentsJoinedByString:@" "]]; |
OlderNewer