Skip to content

Instantly share code, notes, and snippets.

named_scope :coming_soon,
:joins => :showtimes,
:having => 'showtimes.day > CURRENT_DATE'
Feature: Managing movies
In order manage movies
As an authorized user
I want to be able to manage movies
Background: Only authenticated users can add movies
Given a user is logged in as "foobar@example.com"
Given /^a user is logged in as "(.*)"$/ do |email|
Feature: User profiles
In order to have users profiles
for the website
I want to be able to view and edit users
Background: Set up user
Scenario: Edit profile
Given a user is logged in as "foobar@example.com"
ActiveRecord::AssociationTypeMismatch in UsersController#update
Photo(#2175010700) expected, got HashWithIndifferentAccess(#2158250880)
RAILS_ROOT: /Users/felixflores86/Sites/veritas
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:263:in `raise_on_type_mismatch'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/has_one_association.rb:52:in `replace'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations.rb:1278:in `photo='
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2744:in `send'