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

  • Home
  • SEARCH
  • 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 3237450
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:44:24+00:00 2026-05-17T17:44:24+00:00

I am editing some code, and I see the following: <% hook :login do

  • 0

I am editing some code, and I see the following:

<% hook :login do %>
  <% form_tag user_session_path do  %>
    <p>
      <%= label :user_session, :login, 'Email Address' %><br />
      <%= text_field :user_session, 'login' %>
    </p>
    <p>
      <%= label :user_session, :password, 'Password' %><br />
      <%= password_field :user_session, 'password' %>
    </p>
    <p>
      <label>
        <%= check_box :user_session, :remember_me %>
        <%= label :user_session, :remember_me, 'Remember me' %>
      </label>
    </p>

    <p><%= submit_tag 'Log In' %></p>
  <% end %>

  or <%= link_to 'Create a new account', signup_path %> | <%= link_to 'Forgot Password', new_password_reset_path %>
<% end %>

What does

<% hook :login do %>
  ...
<% end %>

do?

I spent about 5 minutes Googling and found nothing on this subject.

  • 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-05-17T17:44:25+00:00Added an answer on May 17, 2026 at 5:44 pm

    In a pure Ruby sense, all it’s doing is calling a method named hook, supplying it one argument and a block.

    And after looking through the Spree soure code, yep, here’s the method: http://github.com/railsdog/spree/blob/master/core/app/helpers/hook_helper.rb

    Without looking further, it’s not obvious what this is used for. I’d imagine it’s to add some piece of HTML to the built-in template (re-defining what the login form looks like, in this case).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote some code to connect the application to it's database, then I created
When editing my strings.xml under res/values I can see them appearing in gen/my_package/R.java but
I'm having a really odd issue and maybe one of you can shed some
Ok, please look at my problem: http://phone7forum.com/viewforum.php?f=2 http://phone7forum.com/viewtopic.php?f=2&t=4 I've been editing a phpBB forum
If I set <compilation targetFramework=4.0> in web.config, Visual Studio 2010 shows all Linq extension
I want to basically upgrade my tomcat version(on RHEL). Always worked in an environment
My WPF desktop-based application uses ADO.Net Entity Framework in order to connect to SQL
What would be a good language/framework pair for learning Web development? I know other
Picture this: you are creating a little module that people can incorporate into their

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.