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
#view | |
#<h3>Project Tree: <%= project_nested_tree_name(issue.project) %></h3> | |
# helper | |
def project_nested_tree_name(project) | |
if project.parent | |
nested_parent_names(project).flatten.join(" > ") | |
else | |
"" | |
end.html_safe |
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
-if @hooks.any? | |
.ui-box | |
.title | |
Web hooks (#{@hooks.count}) | |
%ul.well-list | |
- @hooks.each do |hook| | |
- if hook.persisted? | |
%li | |
.pull-right | |
= link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped" |
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
require 'simplecov' | |
SimpleCov.start 'rails' | |
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' |
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
# "0" period existed before updating ("id"=>"645" - Period.id in database). The record is not destroyed, maybe it is edited | |
# "1" period is destroyed ("_destroy"=>"1"). Rails knows that Period.id=711 should be destroyed | |
# "new_1379871085948" new period | |
"periods_attributes"=>{ | |
"0"=>{"from"=>"0", "to"=>"5", "_destroy"=>"false", "id"=>"645"}, | |
"1"=>{"from"=>"6", "to"=>"7", "_destroy"=>"1", "id"=>"711"}, | |
"new_1379871085948"=>{"from"=>"8", "to"=>"10", "_destroy"=>"false"}} |
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
require 'spec_helper' | |
describe "User" do | |
it "should require a phone number" do | |
user = create(:user).should be_valid | |
end | |
it "should require a valid 10 digit phone number" do | |
user = create(:user).should be_valid | |
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
def canonical_string params | |
result = ActiveSupport::OrderedHash.new | |
params.keys.sort.each do |key, value| | |
result[key] = value | |
end | |
Rack::Utils.build_query(result) | |
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
Started GET "/users/sign_in" for 93.125.83.150 at 2012-03-09 04:49:37 -0800 | |
Processing by Devise::SessionsController#new as HTML | |
Rendered devise/_links.erb (1.8ms) | |
Rendered devise/sessions/_terms_text.html.erb (1.0ms) | |
Rendered devise/sessions/new.html.erb within layouts/user_sessions (76.0ms) | |
Completed 500 Internal Server Error in 185ms | |
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed): | |
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:799:in `connect' | |
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:799:in `block in connect' |