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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:32:36+00:00 2026-06-10T00:32:36+00:00

routes.rb ———– resources :mail_settings My form looks like this the _form.html.erb ——— <%= form_tag

  • 0
 routes.rb
-----------
resources :mail_settings

My form looks like this

the _form.html.erb
---------
<%= form_tag  '/mail_settings' do %>



<div class="fieldBlock">
 <%= label_tag :name %>  <%= text_field_tag :name%> </div>

<div class="fieldBlock">
 <%= label_tag :id%>  <%= text_field_tag :id%> </div>


<div class="actions fieldBlock">
 <%= submit_tag "Update Settings ", :class => "btn-large btn-success" %>
</div>


<% end %>

but I can access individual params like params[:name] without any problem, why is it not working when i try params[:mail_setting] ?

  • 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-10T00:32:37+00:00Added an answer on June 10, 2026 at 12:32 am

    you mean why it is params[:name] and not params[:mail_setting][:name] ? If so, the reason is that you are using form_tag instead of just a form, and family of *_tag helpers [ i.e. text_field_tag ]. In that case you do not ‘bind’ form to the model – in general form_tag is much more flexible than form. However, You should be able to do something like

    <%= text_field_tag "mail_setting[name]"%>
    

    and you will get params[:mail_setting][:name]

    Hope I guessed what you asked about!

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

Sidebar

Related Questions

my routes.rb looks like this map.resources :bookmarks map.connect ':controller/:id/:action' map.connect ':controller/:action' so i can
I've got routes that look like this: resources :projects do resources :tasks end Which
My routes.rb look like this: #... map.resources :users map.root :controller => main #... My
I wrote in routes.rb like this: get 'app/:name&:target' => 'apps#show', :as => :app_info I
Given the code (in routes.rb): resources :products do member do get :delete #this works
In my routes.rb: resources :posts do get test end This produces the usual RESTful
I define routes in my global.asax, like this: routes.MapRoute( Default, {controller}/{action}/{id}, new { controller
routes.rb resources :project_associations, :only => [:update] rake routes project_association PUT /project_associations/:id(.:format) {:action=>update, :controller=>project_associations} ERB
In routes.rb I have described how the search will look like this match results//:transaction/:city(.:format)
my routes should look like this: >rake routes GET /categories/:category_id/articles(.:format) {:controller=>articles, :action=>index} category_articles POST

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.