Skip to content

Instantly share code, notes, and snippets.

<div class="user-messages-nav">
<span <%= current == "inbox" ? 'class = "active" ' : '' %>>
<%= link_to "Inbox", :controller => :mailboxes, :action => :show, :user_id => current_user.id, :id => "inbox" %>
</span>
<span <%= current == "sentbox" ? 'class = "active" ' : '' %>>
<%= link_to "Sent Messages", :controller => :mailboxes, :action => :show, :user_id => current_user.id, :id => "sentbox" %>
</span>
<span <%= current == "trash" ? 'class = "active" ' : '' %>>
<%= link_to "Archive", :controller => :mailboxes, :action => :show, :user_id => current_user.id, :id => "trash" %>
</span>
$(document).ready(function(){
$('.other_submit').click(function(){
this.form.action = this.getAttribute('data-action')
})
})
@gmoeck
gmoeck / env.rb
Created June 21, 2010 19:24
Rails 3 Mongoid Cucumber Setup
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
require 'cucumber/rails/rspec'
require 'cucumber/rails/world'
require 'cucumber/web/tableish'
require 'capybara/rails'
require 'capybara/cucumber'
GIT
remote: git://github.com/aslakhellesoy/cucumber.git
revision: b7e6014
specs:
cucumber (0.9.0)
builder (~> 2.1.2)
diff-lcs (~> 1.1.2)
gherkin (~> 2.2.1)
json_pure (~> 1.4.6)
term-ansicolor (~> 1.0.5)
var task;
module("Given an existing task", {
setup: function() {
SC.RunLoop.begin();
Todos.main();
task = Todos.store.createRecord(Todos.Task, {
'description': 'Some Task',
'isDone': false
});
SC.RunLoop.end();
Todos.Task = SC.Record.extend({
isDone: SC.Record.attr(Boolean),
description: SC.Record.attr(String)
}) ;
1. Setup exception on viewing_task.js Given an existing task module: When looking at the list of tasks: TypeError: Result of expression 'recordType'[undefined] is not an object
2. Died on test #2: Result of expression 'Todos.getPath('mainPage.mainPane.middleView.contentView')' [undefined] is not an object
1. Died on test #2: Result of expression 'Todos.getPath('mainPage.mainPane.middleView.contentView')' [undefined] is not an object
Todos.mainPage = SC.Page.design({
mainPane: SC.MainPane.design({
childViews: 'middleView'.w(),
middleView: SC.ScrollView.design({
childViews: 'contentView'.w(),
contentView: SC.ListView.design({
Died on Test #1: TypeError: Result of expression 'todosList'[null] is not an object