mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-26 02:36:11 +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
|
|
@ -1,12 +1,9 @@
|
|||
<%
|
||||
submit_text ||= t('common.update')
|
||||
# :put for edit note and :post for new note
|
||||
form_method ||= :put
|
||||
|
||||
form_for(note_edit_form, :html => {
|
||||
:id => dom_id(note_edit_form, 'edit_form'),
|
||||
:class => "inline-form edit-note-form",
|
||||
:method => form_method }) do |f|
|
||||
:class => "inline-form edit-note-form"}) do |f|
|
||||
-%>
|
||||
|
||||
<div id="error_status"><%= error_messages_for("note") %></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue