Commit 004ccd7611ac2077576d47a1597f07c8321296b9
Committed by
Antonio Terceiro
1 parent
dbd051c3
Exists in
master
and in
28 other branches
Fix addition of categories
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/views/categories/_form.rhtml
... | ... | @@ -7,12 +7,12 @@ |
7 | 7 | <% if @category.new_record? %> |
8 | 8 | <% if @category.parent %> |
9 | 9 | <%= hidden_field_tag('parent_id', @category.parent.id) %> |
10 | - <%= hidden_field_tag('type', @category.parent.class.name) %> | |
10 | + <%= hidden_field_tag('parent_type', @category.parent.class.name) %> | |
11 | 11 | <% else %> |
12 | 12 | <% if environment.category_types.length > 1 %> |
13 | 13 | <%= select_category_type :type %> |
14 | 14 | <% else %> |
15 | - <%= hidden_field_tag('type', environment.category_types.to_s) %> | |
15 | + <%= hidden_field_tag('type', @category.class.name) %> | |
16 | 16 | <% end%> |
17 | 17 | <% end %> |
18 | 18 | <% end %> | ... | ... |