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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:07:27+00:00 2026-06-16T18:07:27+00:00

The task model has just one field : title. I’ve made a form to

  • 0

The task model has just one field : title.

I’ve made a form to add a new task with one single field : title

But in the create method, we can see that title is filled by “test”

but in the query, we can see “nil” … any ideas ?

thanks

Started POST "/tasks" for 127.0.0.1 at 2013-01-03 13:16:44 -0500
Processing by TasksController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"iWaK1QX6VCyeUCueLrRNErJEtdm/ZNxg4d3LU0vKjnY=", "task"=>{"title"
=>"test"}, "commit"=>"Add a new task "}
   (0.1ms)  begin transaction
  SQL (0.9ms)  INSERT INTO "tasks" ("created_at", "title", "updated_at") VALUES (?, ?, ?)  [["created_at", Thu, 03  Jan 2013 18:16:44 UTC +00:00], ["title", nil], ["updated_at", Thu, 03 Jan 2013 18:16:44 UTC +00:00]]
   (0.8ms)  commit transaction
Redirected to http://0.0.0.0:3000/tasks
Completed 302 Found in 8ms (ActiveRecord: 1.8ms)

here is the create method

  def create
    @task = Task.new(params[:post])

    if @task.save
      redirect_to tasks_path, :notice => "Task successfully saved"  
    else
      render "new"
    end
  end
  • 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-16T18:07:29+00:00Added an answer on June 16, 2026 at 6:07 pm

    The problem is that you are fetching post instead of task

    @task = Task.new(params[:task])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[Updated a bit] I have a Task model that has a :completed boolean attribute.
I have an interesting scenario. I have a task model which has a task
Assume I have this model : class Task(models.Model): title = models.CharField() Now I would
I have a Task model where every task has deadline. class Tasks(models.Model): assigned_to =
I have just got a task in a new project which is implemented using
I have a model for a task which has a name, description, the process
i have task which takes a parameter and has three modes of results Example
How can I get at the Labels data from within my Task model? class
I have a model Task which will HABTM many TaskTargets. When it comes to
I'd like to do something like this: class Task(models.Model): ... created_by = models.ForeignKey( User,

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.