Commit b350914b authored by royce-matthew's avatar royce-matthew

replaced index with links instead of static texts

parent f5b52607
...@@ -3,6 +3,6 @@ class Candidate < ActiveRecord::Base ...@@ -3,6 +3,6 @@ class Candidate < ActiveRecord::Base
has_many :votes has_many :votes
def full_name def full_name
"#{ self.first_name }-#{ self.last_name }" "#{ self.first_name } #{ self.last_name }"
end end
end end
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<thead><td>Name</td><td>Slogan</td><td>Votes</td></thead> <thead><td>Name</td><td>Slogan</td><td>Votes</td></thead>
<%p.candidates.each do |c|%> <%p.candidates.each do |c|%>
<tr><td><%=c.full_name%></td><td ><%=c.slogan%></td><td><%=c.votes.count%></td></tr> <tr><td><%=link_to c.full_name, admin_candidate_path(c.id), {:style =>"font-size:15 px;"}%></td><td ><%=c.slogan%></td><td><%=c.votes.count%></td></tr>
<%end%> <%end%>
</table> </table>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment