Commit bd3ef039d20fdf0705eda1443e5ea3b08d2a250c
1 parent
256b8bf2
Exists in
master
and in
29 other branches
Replacing find search by where on select_profile_folder(lazy loading)
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/helpers/forms_helper.rb
| @@ -275,7 +275,7 @@ module FormsHelper | @@ -275,7 +275,7 @@ module FormsHelper | ||
| 275 | if find_options.empty? | 275 | if find_options.empty? |
| 276 | folders = profile.folders | 276 | folders = profile.folders |
| 277 | else | 277 | else |
| 278 | - folders = profile.folders.find :all, find_options | 278 | + folders = profile.folders.where(find_options) |
| 279 | end | 279 | end |
| 280 | result = labelled_form_field( | 280 | result = labelled_form_field( |
| 281 | label_text, | 281 | label_text, |
app/views/cms/_text_editor_sidebar.rhtml
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | <%= select_profile_folder( | 13 | <%= select_profile_folder( |
| 14 | _('Choose folder to upload files:'), | 14 | _('Choose folder to upload files:'), |
| 15 | :parent_id, profile, default_folder, {}, {}, | 15 | :parent_id, profile, default_folder, {}, {}, |
| 16 | - {:conditions => 'type="Folder" or type="Gallery"'} | 16 | + 'type="Folder" or type="Gallery"' |
| 17 | ) %> | 17 | ) %> |
| 18 | </div> | 18 | </div> |
| 19 | <p><%= file_field_tag('file1') %></p> | 19 | <p><%= file_field_tag('file1') %></p> |