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 7592089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:49:07+00:00 2026-05-30T20:49:07+00:00

I am in the process of adding Devise to my application. Everything seems to

  • 0

I am in the process of adding Devise to my application. Everything seems to be working fine but I am struggling to put the sign in and sign up pages into a jquery container on my homepage. I tried pasting the forms in their directly but I was getting “undefined method” errors with the call to resource that devise makes with its forms.

  <div class="widget">
    <div id="tab-container">
      <ul>
  <li><a href="#create">Create Account</a></li>
  <li><a href="#signin">Sign In </a></li></ul>
<div id="create">

<%= yield :signup %>
    </div>
<div id="signin" style="height: 105px;">
  <ul>
  <%= yield :signin %></ul>
</div>
    </div>
  </div>

<% content_for :document_ready do %>   
  $('#tab-container').easytabs(); 
 <% end %>
 </script>

My Sign Up content

<h2>Sign up</h2>
  <% content_for :signup do %>

  <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name))    
    do |f| %>
   <%= devise_error_messages! %>

  <div><%= f.label :email %><br />
  <%= f.email_field :email %></div>

  <div><%= f.label :username %><br />
    <%= f.text_field :username %></div>

    <div><%= f.label :password %><br />
    <%= f.password_field :password %></div>

  <div><%= f.label :password_confirmation %><br />
   <%= f.password_field :password_confirmation %></div>

  <div><%= f.submit "Sign up" %></div>
    <% end %>
   <% end %>

and my Sign in content

 <h2>Sign in</h2>
  <% content_for :signin do %>

   <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do  
   |f| %>
 <div id="login_form">
 <div><%= f.label :email %><br />
  <%= f.email_field :email %></div>

 <div><%= f.label :password %><br />
 <%= f.password_field :password %></div>

<% if devise_mapping.rememberable? -%>
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
 <% end -%>

  <div><%= f.submit "Sign in" %></div>
  </div>
<% end %>
<% end %>

Is it not a good idea to use content_for inside a partial? Is the yield not rendering before the tab container is called? Thanks in advance!

  • 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-30T20:49:09+00:00Added an answer on May 30, 2026 at 8:49 pm

    Found the answer here Devise form within a different controller.

    Add this to your application helper

     def resource_name
       :user
     end
    
     def resource
       @resource ||= User.new
     end
    
     def devise_mapping
       @devise_mapping ||= Devise.mappings[:user]
     end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently in the process of adding JNI functionality into a legacy delphi app.
I'm in the process of adding Devise to an existing Rails app, with a
I'm new to Javascript/Jquery and struggling with a certain issue. In the process of
I inherited a Django v1.2.4 application and am in the process of adding several
I'm in the process of adding Google Analytics to my iPhone app, but I'm
i have one php file which process adding of record in Database fro array.
I'm in the process of adding custom buttons to my iPhone UI and want
I'm in the process of adding CAPTCHA validation to one of my websites and
I'm in the process of adding a Data Access Layer for our ASP.Net 2.0
I'm in the process of adding some UI functionality to a hybrid WebForms/MVC site.

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.