Sha256: 9efad03099a0038547df267b05ee87f3a4715d4b720b5e10ae6eec4f5731960c

Contents?: true

Size: 967 Bytes

Versions: 13

Compression:

Stored size: 967 Bytes

Contents

class Muck::VisitsController < ApplicationController
  
  unloadable

  before_filter :store_location

  def show
    @entry = Entry.find(params[:id])
    @page_title = @entry.title
    @resource_uri = @entry.resource_uri
    @share = Share.new(:title => @entry.title, :uri => @resource_uri, :entry_id => @entry.id) if GlobalConfig.enable_services_shares
    @recommendations = @entry.related_entries.top

    if GlobalConfig.enable_services_comments
      # Show the activities related to this entry
      @activities = @entry.activities.oldest.only_public.find(:all, :include => ['comments'])
      @comment_count = @activities.length + @activities.inject(0) {|n,activity| activity.comments.length + n }
    end
    
    respond_to do |format|
      format.html { render :template => 'visits/show', :layout => 'frame' }
      format.pjs { render :template => 'visits/show', :layout => false }
      format.json { render :json => @entry.as_json }
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
muck-services-0.1.47 app/controllers/muck/visits_controller.rb
muck-services-0.1.46 app/controllers/muck/visits_controller.rb
muck-services-0.1.45 app/controllers/muck/visits_controller.rb
muck-services-0.1.44 app/controllers/muck/visits_controller.rb
muck-services-0.1.43 app/controllers/muck/visits_controller.rb
muck-services-0.1.42 app/controllers/muck/visits_controller.rb
muck-services-0.1.41 app/controllers/muck/visits_controller.rb
muck-services-0.1.40 app/controllers/muck/visits_controller.rb
muck-services-0.1.39 app/controllers/muck/visits_controller.rb
muck-services-0.1.38 app/controllers/muck/visits_controller.rb
muck-services-0.1.37 app/controllers/muck/visits_controller.rb
muck-services-0.1.36 app/controllers/muck/visits_controller.rb
muck-services-0.1.35 app/controllers/muck/visits_controller.rb