mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
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:
parent
edb3668dba
commit
484356fe07
15 changed files with 51 additions and 52 deletions
|
|
@ -104,11 +104,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def link_to_context(context, descriptor = sanitize(context.name))
|
||||
link_to( descriptor, context_path(context), :title => "View context: #{context.name}" )
|
||||
link_to( descriptor, context, :title => "View context: #{context.name}" )
|
||||
end
|
||||
|
||||
def link_to_project(project, descriptor = sanitize(project.name))
|
||||
link_to( descriptor, project_path(project), :title => "View project: #{project.name}" )
|
||||
link_to( descriptor, project, :title => "View project: #{project.name}" )
|
||||
end
|
||||
|
||||
def link_to_edit_project (project, descriptor = sanitize(project.name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue