Changeset 1138 for trunk/lib/parser

Show
Ignore:
Timestamp:
2008-08-24 22:30:36 (3 months ago)
Author:
gaspard
Message:

r785@gaspard: gaspard | 2008-08-24 22:32:31 +0200
Fixed a bug preventing [select] on 'klass' to correctly set 'selected' option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/parser/lib/rules/zena.rb

    r1137 r1138  
    864864        class_opts[:without]   = @params[:without]  if @params[:without] 
    865865        # do not use 'selected' if the node is not new 
    866         "#{select_tag}<%= options_for_select(Node.classes_for_form(:class => #{klass.inspect}#{params_to_erb(class_opts)}), (#{node}.new_record? ? nil : #{selected})) %></select>" 
     866        "#{select_tag}<%= options_for_select(Node.classes_for_form(:class => #{klass.inspect}#{params_to_erb(class_opts)}), (#{node}.new_record? ? #{selected} : #{node}.klass)) %></select>" 
    867867      elsif @params[:type] == 'time_zone' 
    868868        # <r:select name='d_tz' type='time_zone'/>