2013-04-14 16:46:56 +01:00
|
|
|
= hidden_field_tag 'hook[name]', @hook.name
|
2013-04-15 14:34:11 +01:00
|
|
|
- Hook::SCHEMA[@hook.name.to_sym].each do |type, field|
|
2013-04-15 10:25:40 +01:00
|
|
|
.leftlist= t("activerecord.attributes.hook.data.#{field}")
|
2013-04-14 16:46:56 +01:00
|
|
|
.rightlist
|
2013-04-15 14:34:11 +01:00
|
|
|
- name, value = "hook[data][#{field}]", @hook.data[field]
|
2013-04-14 16:46:56 +01:00
|
|
|
- if type == :boolean
|
2013-04-15 14:34:11 +01:00
|
|
|
= check_box_tag name, value, 1
|
|
|
|
- elsif type == :password
|
|
|
|
= password_field name, value
|
2013-04-14 16:46:56 +01:00
|
|
|
- else
|
2013-04-15 14:34:11 +01:00
|
|
|
= text_field_tag name, value
|
2013-04-14 16:46:56 +01:00
|
|
|
.both
|