Project

General

Profile

RE: Plugin tutorial - Pools from project menu - error aft... » index.html.erb

Tim Whelan, 2014-02-18 11:24

 
1
<h2>PollsController</h2>
2
<% @polls.each do |poll| %>
3
  <p>
4
  <%= poll.question %>?
5
  <%= link_to 'Yes', { :action => 'vote', :id => poll[:id], :answer => 'yes', :project_id => *project identifier here* }, :method => :post %> (<%= poll.yes %>) /
6
  <%= link_to 'No', { :action => 'vote', :id => poll[:id], :answer => 'no', :project_id => *project identifier here* }, :method => :post %> (<%= poll.no %>)
7
  </p>
8
<% end %>
(2-2/2)