curl -d 'spree_user[email][email protected]&spree_user[password]=spree123' http://spree-demo-store.herokuapp.com/api/v1/authorizations
curl -i -H "X-Spree-Token: 5e06dc07fda2b1e4b6ba792ba18e5d964d567cf33a575f55" http://spree-demo-store.herokuapp.com/api/products.json
curl -i -H "X-Spree-Token: 5e06dc07fda2b1e4b6ba792ba18e5d964d567cf33a575f55" http://spree-demo-store.herokuapp.com/api/products/706676762.json
// Requests for users type customer that have been used the public registration to the store
This file contains 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
[class^="icon-"], | |
[class*=" icon-"] { | |
display: inline-block; | |
/*width: 14px; | |
height: 14px;*/ | |
width: 32px; | |
height: 32px; | |
margin-top: 1px; | |
margin-right: .3em; | |
/*line-height: 14px;*/ |
This file contains 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
Para generar un nuevo token desde la api usamos lo siguiente: | |
var server = 'http://localhost:3000'; | |
var userAuthUrl = server + '/api/sessions/create?access_token='; | |
$.ajax({ | |
url: userAuthUrl + access_token, | |
success: function(resp) { | |
console.log(resp); | |
} |
This file contains 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
# si deseas utilizar el codigo que adjuntas que es el siguiente | |
class Api::ResponsesController < ApplicationController | |
respond_to :json | |
def index | |
json_response = { | |
models: "hola" | |
} | |
respond_with json_response | |
end |
This file contains 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 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
##################################################### |
OlderNewer