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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:55:41+00:00 2026-05-31T17:55:41+00:00

I am using https://github.com/plataformatec/simple_form and am trying to send a extra parameter. I have

  • 0

I am using https://github.com/plataformatec/simple_form and am trying to send a extra parameter. I have a Task, List and ListTask models, in the new page of the of the list I want to be able to insert the number of tasks that will be added. When you submit it will send you to the new list_task page with the correct number of forms populated.

=simple_form_for @list do |s|
  =s.input :title
  =s.input :task_count
  =s.button :submit

This produces a error undefined method task_count, which makes sense because it is not a method in list.

  • 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-31T17:55:42+00:00Added an answer on May 31, 2026 at 5:55 pm

    if you don’t want the value persisting to the db, add a virtual attribute:

    class List < ActiveRecord::Base
      attr_accessor :task_count
    end
    

    this will allow you to use that attribute in the form, but that will only persist for the life of that object but it will make it into your POST params.

    …otherwise, if you want it to persist to the db (which is sounds like you may). You’d add task_count as a column in your lists table (via a migration).

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

Sidebar

Related Questions

I have been using https://github.com/Redth/APNS-Sharp to send push notification message to all devices where
I am using the simple_form gem https://github.com/plataformatec/simple_form to create some input fields; one of
I am using the simple_form gem (https://github.com/plataformatec/simple_form) to help out the forms in my
I'm using Anything slider (https://github.com/ProLoser/AnythingSlider/wiki) and I have edited it so that the visitor
I've been following the tutorial on the Devise github page here: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address I'm in
So, I just got setup using Rails 3, Devise and OmniAuth via https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview .
Recently I started using https://github.com/crowdint/rails3-jquery-autocomplete It works great, but I was trying to set
I'm using https://github.com/markfguerra/GLWallpaperService/ to make an android live wallpaper. I'm trying to load a
I am using https://github.com/PaulSolt/UIImage-Conversion However, it seems to have a problem on the alpha
I am trying to use ember-data using https://github.com/emberjs/data as a reference. Specifically, I am

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.