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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:12:29+00:00 2026-06-02T15:12:29+00:00

This is the login page for my app but the role selected for a

  • 0

This is the login page for my app but the role selected for a user is not being reflected in the database so i want to try changing form_for into form_tag to see if the data gets submitted.

 <%= form_for(@user) do |f| %>
      <% if @user.errors.any? %>
        <div id="error_explanation">
          <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
          <ul>
            <% @user.errors.full_messages.each do |msg| %>
              <li><%= msg %></li>
            <% end %>
          </ul>
        </div>
      <% end %>
      <div class="field">
        <%= f.label :email %><br />
        <%= f.text_field :email %>

      </div>
      <div class="field">
        <%= f.label :username %><br />
        <%= f.text_field :username %>
      </div>
      <% if @current_method == "new" %>
        <div class="field">
          <%= f.label :password %><br />
          <%= f.password_field :password %>
        </div>
        <div class="field">
          <%= f.label :password_confirmation %><br />
          <%= f.password_field :password_confirmation %>
        </div>
      <% end %>
      <% for role in Role.find(:all) %>
        <div>
          <%= check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role) %>
          <%= role.name %>
        </div>
      <% end %>
      <div class="actions">
        <%= f.submit %>
      </div>
    <% end %>
  • 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-02T15:12:32+00:00Added an answer on June 2, 2026 at 3:12 pm
    <%= form_tag users_path, methods=> post:do %>
      <% if @user.errors.any? %>
        <div id="error_explanation">
          <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
          <ul>
            <% @user.errors.full_messages.each do |msg| %>
              <li><%= msg %></li>
            <% end %>
          </ul>
        </div>
      <% end %>
      <div class="field">
        <%= label_tag 'email' %><br />
        <%= text_field_tag :email, params[:email], :placeholder => "Email" %>
      </div>
      <div class="field">
        <%= label_tag 'username' %><br />
        <%= text_field_tag :username, params[:username], :placeholder => "Username" %>
      </div>
      <% if @current_method == "new" %>
        <div class="field">
          <%= label_tag :password %><br />
          <%= password_field_tag 'password' %>
        </div>
        <div class="field">
          <%= label_tag :password_confirmation %><br />
          <%= f.password_field_tag 'password_confirmation' %>
        </div>
      <% end %>
      <% for role in Role.find(:all) %>
        <div>
          <%= check_box_tag "user[role_ids][]", role.id, @user.roles.include?(role) %>
          <%= role.name %>
        </div>
      <% end %>
      <div class="actions">
     <%= submit_tag 'submit' %>
      </div>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want the login activity to start when the user starts the app but
I have a Login page that captures User input like this. MD5calc ss =
This question is related to my other question How to redirect to Login page
I have this situation: There are a login page with a login form (form
i have this page . login: fer password: m Note: after login you will
i have 2 page i need to navigate mainpage.xaml to login.page xaml but it
I have a problem rendering the login page. I have followed this turtorial: http://www.dixis.com/?p=352
I am trying to run my app in heroku but I get this error
We have a Login enforcement app which only allows a user to be logged
this is what I am trying to achieve here. I have a login page

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.