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 | 275 | if find_options.empty? |
276 | 276 | folders = profile.folders |
277 | 277 | else |
278 | - folders = profile.folders.find :all, find_options | |
278 | + folders = profile.folders.where(find_options) | |
279 | 279 | end |
280 | 280 | result = labelled_form_field( |
281 | 281 | label_text, | ... | ... |
app/views/cms/_text_editor_sidebar.rhtml
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <%= select_profile_folder( |
14 | 14 | _('Choose folder to upload files:'), |
15 | 15 | :parent_id, profile, default_folder, {}, {}, |
16 | - {:conditions => 'type="Folder" or type="Gallery"'} | |
16 | + 'type="Folder" or type="Gallery"' | |
17 | 17 | ) %> |
18 | 18 | </div> |
19 | 19 | <p><%= file_field_tag('file1') %></p> | ... | ... |