Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:10:59+00:00 2026-06-14T17:10:59+00:00

How would I convert this link if I wanted to use the rails <%=

  • 0

How would I convert this link if I wanted to use the rails <%= link_to %> helper?

Here is my link :

<a id="landing_link" href="#landing"><div id="headerlogo"></div></a>

Another question is that the link is an anchor link. In a link_to from another page, how would I link it to the page (eg. index) and then to the anchor?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:11:00+00:00Added an answer on June 14, 2026 at 5:11 pm

    You can use a do block for link_to:

    The documentation ; their example:

    <%= link_to(@profile) do %>
      <strong><%= @profile.name %></strong> -- <span>Check it out!</span>
    <% end %>
    # produces the following HTML:
    <a href="/profiles/1">
      <strong>David</strong> -- <span>Check it out!</span>
    </a>
    

    In your case, <a id="landing_link" href="#landing"><div id="headerlogo"></div></a> Becomes:

    <%= link_to '#landing', :id => 'landing_link' do %>
      <div id="headerlogo"></div>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would I convert this kind of expression in VB.NET? I'm stomped! bool exists=repo.Exists<Post>(x=>x.Title==My
how would you convert this array: Array ( [0] => Array ( [Contact] =>
I would like to convert this piece of logic with purely matrix operations instead
I would like to convert this string foo_utf = u'nästy chäräctörs with å and
I would like to convert this fluent approach to xml: container.Register( AllTypes.FromAssemblyNamed(Company.DataAccess) .BasedOn(typeof(IReadDao<>)).WithService.FromInterface(), AllTypes.FromAssemblyNamed(Framework.DataAccess.NHibernateProvider)
I'm trying to convert this line into Batch how would one start this exe
I would like to convert a yyyy-mm-dd to something like this: Saturday, 2 October
How would you to convert or cast a List<T> to EntityCollection<T> ? Sometimes this
This is a similar question to this one . I would like to convert
I am using this link to send mails using Mapi. But I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.