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
has_authentication = yes?("Should this project have an authentication support?") | |
# All about gems. | |
gem "authlogic" if has_authentication | |
# All about plugins. | |
plugin "rspec", :git => "git://github.com/dchelimsky/rspec.git" | |
plugin "rspec-rails", :git => "git://github.com/dchelimsky/rspec-rails.git" | |
# Installing gems. |
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
div.auto_complete { | |
width: 350px; | |
background: #fff; | |
font-size: 12px; | |
z-index: 10000; | |
} | |
div.auto_complete ul { | |
border:1px solid #888; | |
margin:0; |
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
sudo mkdir -p /opt/cassandra | |
sudo chown -R root /opt/cassandra | |
sudo mkdir -p /var/log/cassandra | |
sudo chown -R root /var/log/cassandra | |
sudo touch /var/log/cassandra/system.log | |
sudo mkdir -p /var/lib/cassandra | |
sudo chown -R root /var/lib/cassandra |
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 Hospitalizations::TransfersController < BaseController | |
defaults :resource_class => Hospitalization::Transfer | |
def list | |
@transfer_requests = Hospitalization::Transfer::Request.waiting.ordered | |
end | |
def new | |
transfer_request = Hospitalization::Transfer::Request.find(params[:request_id]) | |
@transfer_request = HospitalizationTransferRequestPresenter.new(transfer_request) |
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
<%= simple_form_for(@project) do |project_form| %> | |
<ul id="goals"> | |
<%= project_form.simple_fields_for :goals do |goal_form| %> | |
<%= render 'goal_form', :goal_form => goal_form %> | |
<% end %> | |
</ul> | |
<% 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
select campo1, campo2, campo3, count(*) | |
from tabela | |
group by campo1, campo2, campo3 | |
having count(*) > 1 |
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
scope :active, where(:active => true) | |
before_create :activate! | |
def activate! | |
self.organization.surveys.update_all(:active => false) | |
self.active = true | |
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
class AppResponder < ActionController::Responder | |
include Responders::HttpCacheResponder | |
include Responders::CollectionResponder | |
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
gem 'pg', '>= 0.12.0' |
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 PUT "/users/501417f693a8299573000001/profile.501558af93a8298b18000004" for 127.0.0.1 at 2012-07-29 16:34:38 -0300 | |
Processing by ProfilesController#update as | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"FysnyoQHpHlkSmakkvr14/2yIRuTETA3akbmBTJHiVw=", "profile"=>{"experiences_attributes"=>{"50156f5893a8293a1f000001"=>{"role"=>"Gerente 3", "company_name"=>"", "started_at(3i)"=>"1", "started_at(2i)"=>"1", "started_at(1i)"=>"2012", "finished_at(3i)"=>"1", "finished_at(2i)"=>"1", "finished_at(1i)"=>"2012", "summary"=>"", "id"=>"50156f5893a8293a1f000001"}}}, "commit"=>"Salvar", "user_id"=>"501417f693a8299573000001"} | |
MOPED: 127.0.0.1:27017 COMMAND database=admin command={:ismaster=>1} (0.3431ms) | |
MOPED: 127.0.0.1:27017 QUERY database=globo_resume_development collection=users selector={"$query"=>{"_id"=>"501417f693a8299573000001"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 fields=nil (0.3459ms) | |
MOPED: 127.0.0.1:27017 QUERY database=globo_resume_development collection=users s |
OlderNewer