Sha256: 2b9cf8a3eb3b3a629b3040b7d9127cc1e1df2b7fb4d3c2077c0950a1005539e7
Contents?: true
Size: 1.49 KB
Versions: 2
Compression:
Stored size: 1.49 KB
Contents
class Muck::TinyMceController < ApplicationController layout 'tiny_mce' before_filter :get_parent def tiny_mce_files @body_tag = 'advfile' @load_files_path = files_for_content_url(make_parent_params(@parent).merge(:format => 'json')) respond_to do |format| format.html { render :template => 'tiny_mce/files'} end end def tiny_mce_images @body_tag = 'advimage' @load_files_path = images_for_content_url(make_parent_params(@parent).merge(:format => 'json')) respond_to do |format| format.html { render :template => 'tiny_mce/images'} end end def tiny_mce_links @body_tag = 'advlink' @load_files_path = files_for_content_url(make_parent_params(@parent).merge(:format => 'json')) respond_to do |format| format.html { render :template => 'tiny_mce/links'} end end def images_for_content @parent = current_user if @parent.blank? @images = @parent.uploads.images.paginate(:page => @page, :per_page => @per_page, :order => 'created_at desc') respond_to do |format| format.json { render :json => @images.to_json(:only => [:id], :methods => [:thumb, :file_name]) } end end def files_for_content @parent = current_user if @parent.blank? @files = @parent.uploads.files.paginate(:page => @page, :per_page => @per_page, :order => 'created_at desc') respond_to do |format| format.json { render :json => @files.to_json(:only => [:id], :methods => [:icon, :file_name]) } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
muck-contents-0.2.1 | app/controllers/muck/tiny_mce_controller.rb |
muck-contents-0.2.0 | app/controllers/muck/tiny_mce_controller.rb |