index.html.erb

Tim Whelan, 2014-02-18 11:24

Download (418 Bytes)

 
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 %>