How to link to a class with selective text in ruby? -
Therefore, I am trying to create a link that has a class with some given link and some text here. - "/ account / # {@ name}",: ID = -
& Quot; Cancel & quot; app:, class = & gt; "cancel-app")
What do I need to do is find links to this category called "Canceled-app" , Which is actually a small canceled image with its , I Save "on the sessions and wanted to get exit" or "quit" my. "Save & amp; Exit "or" Exit "button should also be linked. Something like this -
[Cancel button]" Exit "(where both links at one place) < P> Now, what this code does, the image and the text on top of each other, which makes sense, what I thought I wanted to do was put session ID in one variable and then put it in the same way after the link 'Save' and 'cancel': 'exit' = link_to ("/ account / # {@ name}" -
= @exit_text = session [: request_id]? : Id = & gt; ; 'Cancel-application' ,: class = & gt; "cancel app") @exit_text This does not work, I was wondering how can I do this.
Edit - I found a solution, though I think that might be better.
Post text "itemprop =" text "> You still have a link It can:
= link_to "/ store / # {@ name}",: id = & gt; Cancel-application 'do Cancel application = session [: request_id]? 'Save & amp; Exit ': can accept the' exit ' link_to block which is captured for building HTML inside the link. When you pass the block, you do not pass the link label.
Comments
Post a Comment