Agile Web Development with Rails, Edition 4

26.3 Pagination 26.1 Active Merchant

26.2 HAML

edit Gemfile
bundle install --local
Resolving dependencies...
Using rake 10.5.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.3
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99
Using arel 6.0.3
Using bcrypt 3.1.10
Using debug_inspector 0.0.2
Using bundler 1.11.2
Using byebug 8.2.1
Using highline 1.7.8
Using net-ssh 3.0.2
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using thor 0.19.1
Using concurrent-ruby 1.0.0
Using tilt 2.0.2
Using multi_json 1.11.2
Using mysql2 0.4.2
Using qu 0.2.0 from source at `/home/rubys/git/qu-rails`
Using sass 3.4.21
Using spring 1.6.2
Using sqlite3 1.3.11
Using rdoc 4.2.1
Using tzinfo 1.2.2
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using mail 2.6.3
Using binding_of_caller 0.7.2
Using net-scp 1.2.1
Using net-sftp 2.1.2
Using net-ssh-gateway 1.2.0
Using coffee-script 2.4.1
Using uglifier 2.7.2
Using sprockets 3.5.2
Using haml 4.0.7
Using sdoc 0.4.1
Using activesupport 4.2.5 from source at `/home/rubys/git/rails`
Using loofah 2.0.3
Using capistrano 2.15.7
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.6
Using activemerchant 1.56.0
Using activemodel 4.2.5 from source at `/home/rubys/git/rails`
Using jbuilder 2.4.0
Using rails-html-sanitizer 1.0.2
Using rvm-capistrano 1.5.6
Using rails-dom-testing 1.0.7
Using activejob 4.2.5 from source at `/home/rubys/git/rails`
Using activerecord 4.2.5 from source at `/home/rubys/git/rails`
Using actionview 4.2.5 from source at `/home/rubys/git/rails`
Using actionpack 4.2.5 from source at `/home/rubys/git/rails`
Using actionmailer 4.2.5 from source at `/home/rubys/git/rails`
Using railties 4.2.5 from source at `/home/rubys/git/rails`
Using sprockets-rails 3.0.0
Using coffee-rails 4.1.1
Using jquery-rails 4.1.0
Using jquery-ui-rails 5.0.5
Using qu-rails 0.2.0 from source at `/home/rubys/git/qu-rails`
Using rails 4.2.5 from source at `/home/rubys/git/rails`
Using sass-rails 5.0.4
Using web-console 2.2.1
Using turbolinks 2.5.3
Bundle complete! 19 Gemfile dependencies, 68 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
rails runner "require 'haml'"

Restart the server.

cat app/views/store/index.html.erb
<% if notice %>
<p id="notice"><%= notice %></p>
<% end %>
 
<h1><%= t('.title_html') %></h1>
 
<% cache ['store', Product.latest] do %>
  <% @products.each do |product| %>
    <% cache ['entry', product] do %>
      <div class="entry">
        <%= image_tag(product.image_url) %>
        <h3><%= product.title %></h3>
        <%= sanitize(product.description) %>
        <div class="price_line">
          <span class="price"><%= number_to_currency(product.price) %></span>
          <%= button_to t('.add_html'), line_items_path(product_id: product),
            remote: true %>
        </div>
      </div>
    <% end %>
  <% end %>
<% end %>
rm app/views/store/index.html.erb
edit app/views/store/index.html.haml
- if notice
  %p#notice= notice
 
%h1= t('.title_html')
 
- cache ['store', Product.latest] do
  - @products.each do |product|
    - cache ['entry', product] do
      .entry
        = image_tag(product.image_url)
        %h3= product.title
        = sanitize(product.description)
        .price_line
          %span.price= number_to_currency(product.price)
          = button_to t('.add_html'), line_items_path(product_id: product),
            remote: true
get /

Your Pragmatic Catalog

Cs f56ef62bc41b040664e801a38f068082a75d506d9048307e8096737463503d0b

CoffeeScript

CoffeeScript is JavaScript done right. It provides all of JavaScript's functionality wrapped in a cleaner, more succinct syntax. In the first book on this exciting new language, CoffeeScript guru Trevor Burnham shows you how to hold onto all the power and flexibility of JavaScript while writing clearer, cleaner, and safer code.

$36.00
Ruby 836fee16e3757bcd4e2c21d064eee4fa81d7f93e4e9a44b1ffcd6c1d41c92a88

Programming Ruby 1.9 & 2.0

Ruby is the fastest growing and most exciting dynamic language out there. If you need to get working programs delivered fast, you should add Ruby to your toolbox.

$49.95
Rtp d3d2240713cce773840785de837acf822d235d1b77040a3e1ed9d8c014cff086

Rails Test Prescriptions

Rails Test Prescriptions is a comprehensive guide to testing Rails applications, covering Test-Driven Development from both a theoretical perspective (why to test) and from a practical perspective (how to test effectively). It covers the core Rails testing tools and procedures for Rails 2 and Rails 3, and introduces popular add-ons, including Cucumber, Shoulda, Machinist, Mocha, and Rcov.

$34.95

26.3 Pagination 26.1 Active Merchant