search for: taskscontrol

Displaying 6 results from an estimated 6 matches for "taskscontrol".

2006 Mar 08
5
object.save is not creating an insert statement
I have a model for a task class. When I try to save a task, for some reason no INSERT statement is being generated. Here''s the pertinent part of the development.log: ------------------------------------ Processing TasksController#create_fromProject (for 70.247.24.238 at 2006-03-08 14:20:30) [POST] Parameters: {"commit"=>"Create", "action"=>"create_fromProject", "task"=>{...blahblahblah...}, "id"=>"3", "controller"=>"ta...
2008 Jul 04
4
Routing and Parameters
...ype => true %> <%= select_year(Date.today, :prefix => ''year'', :discard_type => true %> <button>go</button> <% end %> If you submit this form, the request generates an URL like this: / tasks?month=7&year=2008 sent to the #index method on TasksController. Why isn''t this recognized as a request to the #calendar action? What am I doing wrong? James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,...
2007 Jul 12
3
Agh, this is annoying. Why is this happening?
My problem: Mock ''Task_1005'' received unexpected message :user_id= with (1) No matter what I do to try to stub that out it will still fail out and give me that message. Here is my spec describe TasksController, "handling POST /tasks" do before(:each) do @task = mock_model(Task, :to_param => "1", :save => true) Task.stub!(:new).and_return(@task) @user = mock_model(User) @user.stub!(:id).and_return(1) @user.stub!(:login).and_return("moo") Use...
2008 Dec 19
3
Delete All action
Hi, What is the best way to delete all members of a model? For example I have a tasks model and want to put a link in that will delete all tasks at once. Something like, @tasks = Task.all @tasks.each { |task| task.destroy } Do I need another action for this, and what should the link to it be? cheers, DAZ --~--~---------~--~----~------------~-------~--~----~ You received this message because
2006 Jul 27
1
Form entries with decimals generating float errors
...d a "time spent" fields in my task form. In my tasks table I have the "time_estimated" and "time_spent" rows assigned as float types. I''ve also tried setting them to decimal (4,2) with no luck. When I submit the form the error reads "NoMethodError in TasksController#create" then "Undefined method `size'' for 1.5:Float". The 1.5 is what I entered as a test in a form field declared with <%= text_field ''task'', ''hours_estimated'', :size => 7 %> Can anyone point me in the right direction? Th...
2008 Apr 23
0
self referential (n-n relationship) belongs many controller
...t;THE PROBLEM :</b> I ve my problem in the create and update of task controller : rows in table links are not created (or badly : task_id is ok, but tasklink_id is KO) Here is my tasks_controller : ------------------------------------------------------------------------------------- class TasksController < ApplicationController helper :sorting def index list @statuts=Statut.find_all render :action => ''list'' end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destr...