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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:08:15+00:00 2026-06-18T12:08:15+00:00

I want to extend registration form in one Rails app for users to be

  • 0

I want to extend registration form in one Rails app for users to be able to submit their roles.

It basically adds few check boxes in the form.
I’m using simple_form gem and it looks like this:

    = f.input :role_mask, as: :check_boxes, label: false,
        collection: ['Investor', 'Mentor', 'Developer', 'Other']

To keep this information in database, I added role_mask:integer field to the User model.

So if the user checked, say, Mentor and Developer, it should store 6 in role_mask field (its mask = 0110).

I know, this mapping could be done inside controller, but since I’m contributing to this app, I don’t want to touch controller. So I’m wondering does simple_form provide some tools to solve this or I should use JavaScript to do the mapping? Thanks for any help.

  • 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-18T12:08:16+00:00Added an answer on June 18, 2026 at 12:08 pm

    You are right. If you don’t want to do it in the controller you will have to do it client side. There is no way to simple_form generate the javascript, so you will have to do it yourself.

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

Sidebar

Related Questions

Hi I want to embed part of registration form from FOSUserBundle into another one.
I want to extend a web server which is only able to handle RPC
I want to extend the faker gem for rails to also generate other random
I want to extend AdvancedDataGrid to show a Waterfall Chart in one of its
My edmx file generate some partial classes. I want extend functionality adding one property,
I have a CakePHP application with user registration. On the users page, I want
I want to extend Object.prototype, to basically support notifications in JSON data and html
I am using embedded forms to be able to make a registration form, which
I want to extend additional user registration fields, and other tutorial suggested the way
I've got a problem when I want to override the FOSUserBundle registration Form. The

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.