Class ReferenceController
In: controllers/reference_controller.rb
Parent: ApplicationController
ReferenceController AjaxController ApplicationController dot/f_128.png

Methods

Included Modules

AjaxController

Public Instance methods

[Source]

# File controllers/reference_controller.rb, line 14
  def destroy
    id = @reference.id
    @movie = @reference.movie
    @reference.destroy
    render(:update) do |page|
      page.remove "movie-reference-#{id}"
      page.replace_html 'overview-references', :partial => 'movie/overview_references'
    end
  end

[Source]

# File controllers/reference_controller.rb, line 6
  def random
    @reference = Reference.random
    respond_to do |type|
      type.html { render :action => :index }
      type.js { render :inline => "#{@reference.referenced_movie.id};#{@reference.class.to_s};#{@reference.movie.id}" }
    end
  end

Private Instance methods

[Source]

# File controllers/reference_controller.rb, line 26
  def select_reference
    @reference = Reference.find(params[:id])
  end

[Source]

# File controllers/reference_controller.rb, line 30
  def title
    "Random Reference".t
  end

[Validate]