Skip to content

Commit

Permalink
- better admin pictures and albums cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rubydev committed Mar 25, 2011
1 parent c30ba6c commit 0897ffb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/albums/_form.html.haml
Expand Up @@ -7,7 +7,7 @@
= f.text_area :description, :class => 'smallText'
%br
%br
- cache(:action => params[:action], :action_suffix => "admin_album_tree") do
- cache(:controller => :albums, :action => :new, :action_suffix => "admin_album_tree", :id => 1) do
= f.label :parent_id, 'Zařaďte adresář do struktury:'
= f.select(:parent_id, nested_set_options(Album.all(:conditions => "album_type='#{params[:type]}'", :order => "created_at DESC"), @album) {|i| "#{'-' * i.level} #{i.name}" }, { :prompt => "------------" } )
%br
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/pictures/_form.html.haml
Expand Up @@ -3,7 +3,7 @@
-#= render :partial => 'photo', :locals => { :f => f }
-#= params[:type]
%br
- cache(:action => params[:action], :action_suffix => "admin_pictures_tree") do
- cache(:controller => :albums, :action => :new, :action_suffix => "admin_album_tree", :id => 1) do
= f.label :parent_id, 'Zařaďte obrázky do struktury:'
= f.select(:album_id, nested_set_options(Album.all(:conditions => "album_type='#{params[:type]}'", :order => "created_at DESC" )) {|i| "#{'-' * i.level} #{i.name}" } )
%br
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/pictures/_form_new.html.haml
Expand Up @@ -3,7 +3,7 @@
-#= render :partial => 'photo', :locals => { :f => f }
-#= params[:type]
%br
- cache(:action => params[:action], :action_suffix => "admin_pictures_tree") do
- cache(:controller => :albums, :action => :new, :action_suffix => "admin_album_tree", :id => 1) do
= f.label :parent_id, 'Zařaďte obrázky do struktury:'
= f.select(:album_id, nested_set_options(Album.all(:conditions => "album_type='#{params[:type]}'", :order => "created_at DESC" )) {|i| "#{'-' * i.level} #{i.name}" } )
%br
Expand Down

0 comments on commit 0897ffb

Please sign in to comment.