Project

General

Profile

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

Tim Whelan, 2014-02-18 11:24

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