Palestra apresentada na RubyConfBrazil 2013. Aborda práticas, convenções e algumas ferramentas que facilitam a integração de novos membros à projetos Rails existentes.
gem 'sass-rails', '~> 4.0.0' ... Your Ruby version is 1.8.7, but your Gemfile specified 1.9.3 Gemfile , :engine => 'jruby', :engine_version => '1.6.7' Your Ruby engine is ruby, but your Gemfile specified jruby ruby '1.9.3'
= params.delete(:address) @user = User.new(params) end def create user.save if valid_background_check? end private def valid_background_check? valid_ssn? && valid_address? end end
'sass-rails', '~> 4.0.0' ... Gemfile gem 'thin' => Booting Thin => Rails 4.0.0 application starting in development on http://0.0.0.0:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server >> Thin web server (v1.5.0 codename Knife) >> Maximum connections set to 1024 $ rails s
end cookie digitally signed visto no browser require 'rack' cookie = "BAh7CUkiD3Nlc3Npb25faWQGOgZFRkkiJ(...)" Rack::Session::Cookie::Base64::Marshal.new.decode(cookie) => {"session_id"=>"d3b170ba43a95f93e915388e62acdf6a", "user_id"=>"123", "_csrf_token"=>"rtkofTr8uQnCHc8CMxdpFHD(...)"} Lendo conteúdo de um cookie digitally signed