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
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' |
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
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 "[email protected]" |
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
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 "[email protected]" | |
Given /^a user is logged in as "(.*)"$/ do |email| |
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
named_scope :coming_soon, | |
:joins => :showtimes, | |
:having => 'showtimes.day > CURRENT_DATE' |
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
# WHAT!!!! | |
(rdb:27) @movies_for_the_week[1][:items].size | |
2 | |
(rdb:27) @movies_for_the_week[1][:items] | |
[] | |
(rdb:27) @movies_for_the_week[1][:items].size | |
0 | |
>> m = Movie.for_the_week |
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 MoviesController < ApplicationController | |
def index | |
if params[:filter] == "coming_soon" | |
@movies = Movie.coming_soon | |
else | |
@movies_for_the_week = Movie.for_the_week | |
end | |
@view = params[:filter] | |
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
// Assuming you have underscore and jQuery as a project dependency. | |
// You can use this to include individual files on your jasmine specs. | |
// Sample Usage | |
requireJS('myJSfile', 'myOtherJsFile'); | |
describe("My stuff", function() { | |
it("rocks", function() { | |
// your spec |
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
// | |
// UIViewController+Segue.h | |
// TimeCapsule | |
// | |
// Created by Felix Flores on 12/19/12. | |
// Copyright (c) 2012 felixflor.es. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// | |
// UIViewController+ActionSheet.h | |
// Tweaks | |
// | |
// Created by Felix Flores on 12/21/12. | |
// Copyright (c) 2012 felixflor.es. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
Felix is software developer who likes to dabble in art, snowboarding | |
and often times finds himself in very unusual situations. |
OlderNewer