Hi all,
I am working on a feature to allow administrators of an online
store to rearrange the order in which their product categories show up on
the site. I want to use a simple implementation of sortable_lists
(madrobby.github.com/scriptaculous/sortable-lists-demo/) to allow the
administrators
Hi all,
Suppose I have a table that lists all of my products, that
includes a a somewhere in the first , and each product has its data held
within a . After updating a product's description, I want to write
something like:
within "tr#category#{category.id}" do
under_header
"Description" do
Hi all,
What's the best way to handle features which rely on an
external API in a behaviour-driven way? Suppose I have an app which manages
online ordering from several independent stores, with a cut taken from each
purchase, and I want to add a feature whereby orders made by phone that
were fa
Hi all,
What's the best way to implement performance enhancements from
the outside-in? For example, if I'm working test-free and I know I'm going
to be looking up my Shops by phone number often, I'll write a migration to
make phone_number an index of the shops table. What feature(s) and spec(s)
Hi all,
I was recently brought onto a Rails 2.2.3 project which was
itself an emergency rescue of a spaghetti-coded PHP project (complete with
hard-coded SQL statements!). Due to the fact that the code was already in
production and has required fairly constant maintenance and feature
additions,
communication.
spec/controllers/users_controller_spec.rb:
require 'spec_helper'
describe UsersController do
describe "POST create" do
it "creates a new
user" do
User.should_receive(:new).with("name" => "Shea Levy")
post
:create, :user =