Sha256: 4650ef47865388991ab7e7efebc5e3eb513df4d30338fb24d99f9086a04d76cb

Contents?: true

Size: 945 Bytes

Versions: 1

Compression:

Stored size: 945 Bytes

Contents

ActiveAdmin.register Kinney::Clip do
  form :partial => "form"
    
  index do
    column :filename, :sortable => :filename do |clip|
      link_to clip.filename, admin_kinney_clip_path(clip)
    end
    column :title
    column :top_pick
    column :featured
    column :duration
    default_actions
  end
  
  show do |clip|
    attributes_table do
      row :filename
      row :duration
      row :title
      row :description
      row :interview_date
      row :quotes
      row :top_pick
      row :featured
      row :created_at
      row :updated_at
      row :slug
      row :video do
        div(:style => 'width:480px;height:272px') do
          render :partial => '/kinney/video', :locals => {:clip => clip}
        end
      end
    end
    active_admin_comments
  end
  
  controller do
    cache_sweeper Kinney::MetaSweeper
  end
  
  collection_action :quotes do
    @clips = Kinney::Clip.where('quotes IS NOT NULL')
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kinney-0.0.1 app/admin/clips.rb