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
function parse_git_branch { | |
if we_are_in_git_work_tree | |
then | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
fi | |
} | |
function we_are_in_git_work_tree { | |
git rev-parse --is-inside-work-tree &> /dev/null | |
} |
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
def create | |
@user_session = UserSession.new(params[:user_session]) | |
respond_to do |format| | |
if @user_session.save | |
add_flash :notices, "Login successful." | |
c = @user_session.user | |
if @user_session.user.host_with_port.nil? | |
@user_session.user.host_with_port = request.host_with_port | |
@user_session.user.save |