Skip to content

Instantly share code, notes, and snippets.

View tmaier's full-sized avatar
🤓
I like pizza

Tobias L. Maier tmaier

🤓
I like pizza
View GitHub Profile
@tmaier
tmaier / bootstrap_topbar_list.rb
Created January 2, 2012 11:08
BootstrapTopbarList for simple-navigation and Twitter Bootstrap integration
# Renders an ItemContainer as a <ul> element and its containing items as <li> elements.
# Prepared to use inside the topbar of Twitter Bootstrap http://twitter.github.com/bootstrap/#navigation
#
# Register the renderer and use following code in your view:
# render_navigation(level: 1..2, renderer: :bootstrap_topbar_list, expand_all: true)
class BootstrapTopbarList < SimpleNavigation::Renderer::Base
def render(item_container)
if options[:is_subnavigation]
ul_class = "dropdown-menu"
@tmaier
tmaier / console_output.txt
Created November 24, 2011 15:08
Trouble with polymorphic relations see mongoid#1433
noname:SampleApp tobiasmaier$ rm log/*
noname:SampleApp tobiasmaier$ bin/rspec spec/requests/tasks_spec.rb
Run filtered including {:focus=>true}
F
Failures:
1) Tasks GET /projects/12345/tasks/12345/edit edit
Failure/Error: page.should have_content "2010-08-01"
expected there to be content "2010-08-01" in "\n\nProjects > Mein Projekt 1 > Tasks > Kellergeschoss\n\nTask was successfully updated.\nKellergeschoss\nDetails\nA001\nKellergeschoss\nMein Projekt 1\nTarget Values\n\n2010-01-01 00:00:00 +0100\n2010-01-10 00:00:00 +0100\n\nWork Breakdown Structure\nErdgeschoss\nObergeschoss\nEdit\n|\nBack\n\n"