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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:03:25+00:00 2026-06-01T11:03:25+00:00

In my rails form i am using a multi select tag code looks like

  • 0

In my rails form i am using a multi select tag

code looks like

  <%= select_tag '[mycontroller][users]', @users, { :multiple => true, :size => 7} %>
  <p><%= submit_tag l(:button_apply)%></p>

On form submit parameters passed are

 mycontroller[users][]=79&mycontroller[users][]=80&commit=Apply

Now in my view file when i retrieve params they are being converted to string
so i get [79,80] being converted to “7980”

code for getting user param looks like

users =  params[:mycontroller][:users] unless params[:mycontroller].nil? 

Edit:

Problem i suppose is that “#{}” converts array to string. even <%= %> will call to_s

So how to override this? So that to_s will return “79,80” instead of “7980”

What am i missing?
Comments, please?

Thnx.

  • 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-01T11:03:26+00:00Added an answer on June 1, 2026 at 11:03 am

    Try to call array.join(“,”) and a array of [79,80] should become a string like “79,89”

    Ruby Join Method

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

Sidebar

Related Questions

In my rails form I'm using the select tag. <%= f.select :featured, Timeline::TIMELINE_FEATURED, :prompt
Here how my rails form looks like: - form_tag rel_references, :remote => true, :id=>references_form,
I would like to have Ajax form in Rails so i'm using form_remote_tag. The
I have a three-level multi-nested form in Rails. The setup is like this: Projects
So it looks like on RoR, when Ajax (using form_remote_tag) returns a success code,
id like to make a multistep form with rails using the edit and update
I'm asking about using a Twitter Bootstrap modal window with a Rails form helper
I'm using form_remote_for() to do validation on a form's data so that my rails
I am using client_side_validations gem to perform a form validation in rails 3. everything
I have started using jQuery and rails. I have made a simple form that

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.