POST /:account_key/ratings
{"uid": "http://site.bootic.net/products/foobar", "rating": 4}
(También puede ser GET con JSONp)
| var message = 'Hello!'; | |
| (function() { | |
| var message = 'Hi!'; | |
| alert(message); | |
| })(); |
| <!-- Formulario y botón "agregar al carro" en plantilla product.html. | |
| Los data-attributes son necesarios para la API Ajax del carrito (opcional) --> | |
| <form class="add_to_cart" action="{{ add_to_cart_url }}" method="post" data-bootic-cart-add="add" data-bootic-productId="{{ product.id }}"> | |
| <!-- si hay más de 1 variante, muéstralas en una lista --> | |
| {% if product.variants_count > 1 %} | |
| <h4>{{ 'activerecord.models.variant' | t }}</h4> | |
| <ul class="variants"> | |
| <!-- primero las variantes disponibles --> | |
| {% for variant in product.available_variants %} | |
| <li class="bootic_variant available {% cycle 'odd', 'even' %} av-variant-{{ forloop.index }}"> |
| require 'date' | |
| require 'koala' | |
| class BirthdayLiker | |
| FACEBOOK_TOKEN = 'your_oauth_key' | |
| BIRTHDAY_WORDS = %w(birthday bday birfday birth born) | |
| DATE_TIME_FORMAT = '%Y-%m-%d' | |
| def initialize(birthdate, opts={}) | |
| @api = Koala::Facebook::API.new(FACEBOOK_TOKEN) |
| <!-- Formulario y botón "agregar al carro" en plantilla product.html. | |
| Los data-attributes son necesarios para la API Ajax del carrito (opcional) --> | |
| <form class="add_to_cart" action="{{ add_to_cart_url }}" method="post" data-bootic-cart-add="add" data-bootic-productId="{{ product.id }}"> | |
| <!-- si hay más de 1 variante, muéstralas en una lista --> | |
| {% if product.variants_count > 1 %} | |
| <h4>{{ 'activerecord.models.variant' | t }}</h4> | |
| <ul class="variants"> | |
| <!-- primero las variantes disponibles --> | |
| {% for variant in product.available_variants %} | |
| <li class="bootic_variant available {% cycle 'odd', 'even' %} av-variant-{{ forloop.index }}"> |
| <h1>{{ search_term }} | {{ products | size }} productos encontrados</h1> | |
| {% if products.size > 0 %} | |
| <ul class="products clearfix"> | |
| {% loop products in 'product_item' %} | |
| </ul> | |
| {% else %} | |
| No hay resultados. | |
| {% endif %} |
| <?php | |
| /* | |
| Plugin Name: Event Custom Post Type | |
| Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/ | |
| Description: Custom Post Types for Event | |
| Author: Neil Gee | |
| Version:1 | |
| Author URI:http://wpbeaches.com | |
| */ |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| context "GET index" do | |
| #context "POST create" do | |
| #context "GET show" do | |
| #context "PATCH update" do (or PUT update) | |
| #context "DELETE destroy" do | |
| #context "GET new" do |
| /* Collect product information for products in the cart | |
| Usage: | |
| Get all products in the cart | |
| CartInfo.getProducts(function (products) { | |
| // products is an array of product objects | |
| console.log(products) | |
| }) |