The redis configuration file is likely located at /usr/local/etc/redis.conf
cp /usr/local/etc/redis.conf /usr/local/etc/redis2.conf
Change the port number from 6379 to something else. I used 6380
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) | |
func main() { |
# Retrieve the user | |
user = User.find(params[:user_id]) | |
# Get all of the messages for the user and order so that the most recent message is first | |
raw_messages = Message.where("sender_user_id=? or receiver_user_id=?", user.id, user.id).order("created_at DESC") | |
# Our goal is to make a hash that looks like this: | |
# { | |
# other_party_1: [msg1, msg2, msg3], | |
# other_party_2: [msg7, msg8, msg9], |
The redis configuration file is likely located at /usr/local/etc/redis.conf
cp /usr/local/etc/redis.conf /usr/local/etc/redis2.conf
Change the port number from 6379 to something else. I used 6380
Source: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
https://www.youtube.com/watch?v=bUBtG39Q7dw
Feature: Ratings and Reviews | |
As a User, | |
In order to rate a listing | |
I should be able to leave a review for a listing | |
Scenario: Successfully submit the review | |
Given a Ratings and Review form for a Listing | |
When the form is submitted with valid information | |
Then the browser should be redirected to the R&R Thank You page | |
And the ratings count should be incremented by 1 for the listing |
Product management has come up with the idea of allowing website users to leave reviews and ratings for listings. This feedback will be entered similar to how leads are submitted, but the user must enter the following information:
In addition to the above information, a CAPTCHA presenting three different apartment complexes (only one of which is correct) is used in conjunction with the user’s name and phone number to determine whether or not the user actually lived at the listing. After validating and verifying the information, the user gets redirected to a thank you page. After a review is successfully submitted, it will show up as the first entry in the reviews for the listing. Pre-existing “certified resident” reviews will be integrated along with reviews that are submitted through the site. On the search results page, users can sort on rating type or filter on review type and rating. A link on each listing will take the us
$(function() { | |
hideAllHelpers(); | |
$('#person_first_name').focus(function() { | |
$('#person_first_name_helper').show(200); | |
}); | |
$('#person_first_name').blur(function() { | |
$('#person_first_name_helper').hide(200); | |
}); | |