mdarby-pollster 0.1.2.2 → 0.1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -97,8 +97,4 @@ class <%= class_name %> < ActiveRecord::Base
97
97
  total_votes > 0
98
98
  end
99
99
 
100
- def options=(arr)
101
- write_attribute(:options, [*arr].map{|x| x["options"]})
102
- end
103
-
104
100
  end
@@ -42,12 +42,6 @@ describe <%= class_name %> do
42
42
  @<%= object_name %>.total_votes.should == 1
43
43
  end
44
44
 
45
- it "should know how to shave the options yak" do
46
- @<%= object_name %>.options = [{"options" => "first"}, {"options" => "second"}, {"options" => "third"}]
47
- @<%= object_name %>.save
48
- @<%= object_name %>.options.should == ["first", "second", "third"]
49
- end
50
-
51
45
  it "should be visible for a week after its end date" do
52
46
  Date.stub!(:today => Date.parse("2009-01-09"))
53
47
  @<%= object_name %>.stub!(:ends_at => Date.parse("2009-01-07"))
@@ -1,7 +1,5 @@
1
- <div id="option">
2
- <%% fields_for "<%= object_name %>[options][]", option, :index => nil do |f| %>
3
- <%%= f.text_field :options, :value => option %>
4
- <%%= link_to_function "Remove", "$(this).up('.option').remove()" %>
5
- <br/>
6
- <%% end %>
1
+ <div class="option">
2
+ <input name="<%= object_name %>[options][]" value="#{option}">
3
+ <%%= link_to_function "Remove", "$(this).up('.option').remove()" %>
4
+ <br/>
7
5
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdarby-pollster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.2
4
+ version: 0.1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Darby