Class: ImagesController

Inherits:
InheritedResources::Base
  • Object
show all
Defined in:
app/controllers/images_controller.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



25
26
27
28
# File 'app/controllers/images_controller.rb', line 25

def collection
  @images ||= end_of_association_chain.
    paginate(:page => params[:page], :order => 'created_at DESC' )
end

#createObject



13
14
15
# File 'app/controllers/images_controller.rb', line 13

def create
  create! {edit_gallery_path(@gallery, params.slice(:CKEditor, :CKEditorFuncNum, :langCode))}
end

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/images_controller.rb', line 5

def index
  index! do |format|
    if params[:CKEditorFuncNum]
      format.html {render :action=>:index, :layout=>"image_dialog"}
    end
  end
end

#showObject



17
18
19
20
21
22
23
# File 'app/controllers/images_controller.rb', line 17

def show
  show!  do |format|
    if params[:CKEditorFuncNum]
      format.html {render :layout=>"image_dialog"}
    end
  end
end