search for: find_project

Displaying 3 results from an estimated 3 matches for "find_project".

2006 Dec 29
2
update_attributes fails: ReadOnlyRecord
I''m trying to update a record, but it just stops with "ActiveRecord::ReadOnlyRecord". I don''t understand why, because I never wanted my model to be read only. Relevant code: Controller: def edit @project = find_project if request.post? @project.update_attributes(params[:project]) if @project.save flash[:message] = _(''Project was updated'') redirect_to :action => ''index'' return else flash[:warning] = _(''Could not...
2007 Dec 04
7
REST bug with form_for
Hi all, I am running on Windows XP sp2 with ruby 1.8.6, and rails 1.2.3 I am using REST, and have this in my view <% form_for(:project, :url => project_path(:user_id => @project.my_user, :id => @project), :html => {:method => :put}) do |f| %> The browser correctly gives <form method="post" action="/users/2/projects/1">
2007 Dec 06
43
Mocks? Really?
OK, so i''ve played a bit with mocks and mock_models in controller and view tests and i have a question. Is this statement really correct: "We highly recommend that you exploit the mock framework here rather than providing real model objects in order to keep the view specs isolated from changes to your models." (http://rspec.rubyforge.org/documentation/rails/writing/views.html