gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
module TweetsHelper | |
def build_tweets_hash tweets | |
@tweets_array = [] | |
tweets.each do |tweet| | |
tweet_hash = { | |
user: tweet['user']['screen_name'], | |
user_profile: ENV['TWITTER_URL'] + tweet['user']['id'].to_s, | |
followers_count: tweet['user']['followers_count'], | |
retweets: tweet['retweet_count'], |
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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
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 UserController < ApplicationController | |
def index | |
@users = User.all | |
end | |
def create | |
@user = User.new(user_params) | |
if @user.save | |
redirect_to users_path | |
else |
OlderNewer