Skip to content

Instantly share code, notes, and snippets.

View typesend's full-sized avatar

Ben Damman typesend

  • Missoula, Montana
  • 01:59 (UTC -06:00)
  • X @typesend
View GitHub Profile
@typesend
typesend / gist:2520726
Created April 28, 2012 17:42 — forked from starflyer59/gist:2505474
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
######### _stars.html.erb ###################
<div id="starRating">
<%= form_for(rating_ballot, :html => { :class => 'rating_ballot' }) do |f| %>
<%= f.label("value_1", content_tag(:span, '1'), {:class=>"rating", :id=>"1"}) %>
<%= radio_button_tag("rating[value]", 1, current_user_rating == 1, :class => 'rating_button') %>
<%= f.label("value_2", content_tag(:span, '2'), {:class=>"rating", :id=>"2"}) %>
<%= radio_button_tag("rating[value]", 2, current_user_rating == 2, :class => 'rating_button') %>
@typesend
typesend / gist:25552
Created November 16, 2008 21:17
data_objects_adapter.rb ArgumentError
If you get this disgusting error just:
gem uninstall addressable --version 2.0
~/merbtest ben$ merb
Loading init file from /Users/ben/merbtest/config/init.rb
Loading /Users/ben/merbtest/config/environments/development.rb