small improvements

render :partial => filename, :object => @object can be written shorter since rails 2.0 like
render :partial => @object or render :partial => @collection
Also form_for is smart bout put and post for update and creation.

it helps watching older railcasts episodes :-)
This commit is contained in:
Reinier Balt 2010-11-29 11:04:15 +01:00
parent edb3668dba
commit 484356fe07
15 changed files with 51 additions and 52 deletions

View file

@ -56,7 +56,7 @@ class ProjectsController < ApplicationController
@next_project = current_user.projects.next_from(@project)
@previous_project = current_user.projects.previous_from(@project)
@default_tags = @project.default_tags
@new_note = current_user.notes.build
@new_note = current_user.notes.new
@new_note.project_id = @project.id
respond_to do |format|
format.html