17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/clot/no_model_form_tags.rb', line 17
def set_attributes(context)
set_primary_attributes(context)
@params.each do |pair|
pair.match /([^:]*):(.*)/
pair = [$1, $2]
value = resolve_value(pair[1],context)
if personal_attributes(pair[0], value)
next
end
case pair[0]
when "value" then
@value_string = value
when "type" then
@type = value
when "accept" then
@accept_string = %{accept="#{CGI::unescape value}" }
when "class" then
@class_string = %{class="#{value}" }
when "onchange" then
@onchange_string = %{onchange="#{value}" }
when "maxlength" then
@max_length_string = %{maxlength="#{value}" }
when "disabled" then
@disabled_string = %{disabled="#{if (value == true || value == "disabled") then 'disabled' end}" }
end
end
end
|