routing - Rails link a tags -


I have a code and I want to create a tag between the div with the square box.
I can not just use the link_to method because I want this link to include all the HTML code on its related closing. Therefore, anyone who clicks within that box is taken to its equivalent: & lt;% = link_to ('go', {action: edit, id: course.id})% & gt; I tried to find this more, but failed.

  & lt;% @ courses.in_groups_of (3, false). Group | & Gt%; & Lt ;! - Group of three courses - & gt; & Lt; Div class = "row" & gt; & Lt;% group.each do | Course | & Gt%; & Lt; Div class = "colonel-xs-12 col-sm-6 col-lg-4" & gt; & Lt; Div class = "box" & gt; & Lt; Div class = "icon" & gt; & Lt; Div class = "image" & gt; & Lt; Span class = "glyphicon glyphicon-list-alt btn-lg white" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; Div class = "info" & gt; & Lt; H3 class = "title" & gt; & Lt;% = course.name% & gt; | GPA: & lt;% = course.gpa.to_f%> & Lt; / H3 & gt; & Lt; P & gt; & Lt;% = course.description% & gt; & Lt; / P & gt; & Lt; Div class = "plus" & gt; & Lt; A href = "#" headline = "title link" & gt; & Lt; I class = "fa fa-plus" & gt; & Lt; / I & gt; Details & lt; / A & gt; & Lt;% = link_to ('go', {action :: edit, id: course.id})%> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "space" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt;% end% & gt; & Lt; / Div & gt; & Lt;% end% & gt;    

  & lt;% = link_to ({action: edit, id : Course.id})% & gt; & Lt; Div class = "box" & gt; & Lt; Div class = "icon" & gt; & Lt; Div class = "image" & gt; & Lt; Span class = "glyphicon glyphicon-list-alt btn-lg white" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; Div class = "info" & gt; & Lt; H3 class = "title" & gt; & Lt;% = course.name% & gt; | GPA: & lt;% = course.gpa.to_f%> & Lt; / H3 & gt; & Lt; P & gt; & Lt;% = course.description% & gt; & Lt; / P & gt; & Lt; Div class = "plus" & gt; & Lt; A href = "#" headline = "title link" & gt; & Lt; I class = "fa fa-plus" & gt; & Lt; / I & gt; Details & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt;% end% & gt;    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -