Sha256: d492cae58f28f1d4734d00e5dce35f01282f185538c694603a6221c0d3f9731d

Contents?: true

Size: 620 Bytes

Versions: 5

Compression:

Stored size: 620 Bytes

Contents

case @favorite.favoritable.class.to_s.tableize
  when 'clippings'

    page.select("#clipping_#{@favorite.favoritable.id}").each do |element|
      element.replace(render(:partial => 'clippings/clipping', :object => @favorite.favoritable)) 
    end
    page.select("#clipping_#{@favorite.favoritable.id}_meta").each do |element|
      element.replace(render(:partial => 'clippings/meta', :formats => [:html], :locals => {:clipping => @favorite.favoritable}))    
    end


  when 'posts'
    page.replace "post_#{@favorite.favoritable.id}_meta", :partial => 'posts/meta', :locals => {:post => @favorite.favoritable} 
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
community_engine-2.3.2 app/views/favorites/destroy.js.rjs
community_engine-2.3.1 app/views/favorites/destroy.js.rjs
community_engine-2.3.0 app/views/favorites/destroy.js.rjs
community_engine-2.1.0 app/views/favorites/destroy.js.rjs
community_engine-2.0.0 app/views/favorites/destroy.js.rjs