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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:51:30+00:00 2026-05-13T23:51:30+00:00

Id like to be able to create checkboxes for a list of objects. Then

  • 0

Id like to be able to create checkboxes for a list of objects. Then offer the user a number of actions to perform on the objects selected. I.e. delete, archive etc.

I know of ryan’s screencasts but it doesnt explain how to create links to multiple actions for the selected objects. It just showed him create a form_tag with a url to one action and a submit button.

  • 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-13T23:51:31+00:00Added an answer on May 13, 2026 at 11:51 pm

    I think you can do it in two ways.

    First: you can add as many buttons to one form as you want:

    <%= f.submit "Action 1" %>
    <%= f.submit "Action 2" %>
    <%= f.submit "Action 3" %>
    

    And all of them are submitted to one action in which you can check:

    if params[:commit] == "Action 1"
      do some stuff for action 1
    elsif params[:commit] == "Action 2"
      do other stuff
    ... and so on
    end
    

    Another way is to use some js. On example when user clicks on button “Action 2” it changes “action” parameter in form and submits data to this action.

    EDIT:
    In case of translated websites, you can do it like this:

    <%= f.submit (I18n.t :action_1) %>
    

    and in controller:

    if params[:commit] == I18n.t :action_1
    ...
    end
    

    And in en.yml add:

    action_1: Action 1
    

    In pl.yml add:

    action_1: Akcja 1
    

    and so on.

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

Sidebar

Related Questions

I would like to be able to create a variable that holds an instance
I'd like to be able to create variables using a function, something like: function
I would like to be able to create a bean whose scope is limited
I'd like to be able to create my own container subclasses of UIView which
I'd like to be able to create a javascript object from my html form
I'd like to be able to create an object that is created like a
In Python, I'd like to be able to create a function that behaves both
I've got the following theoretical problem. I'd like to be able to create multiple
I want to be able to create links looking like buttons with dynamic text
I would like to be able to create a collection of nodes where 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.