Sha256: 6cb27d49f7f8b1dfebbc7eca60ab9d5a2028ef8bbeeb808f7b247340e2276c0d

Contents?: true

Size: 917 Bytes

Versions: 11

Compression:

Stored size: 917 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

    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

11 entries across 11 versions & 1 rubygems

Version Path
muck-services-0.1.12 app/controllers/muck/visits_controller.rb
muck-services-0.1.11 app/controllers/muck/visits_controller.rb
muck-services-0.1.10 app/controllers/muck/visits_controller.rb
muck-services-0.1.9 app/controllers/muck/visits_controller.rb
muck-services-0.1.8 app/controllers/muck/visits_controller.rb
muck-services-0.1.7 app/controllers/muck/visits_controller.rb
muck-services-0.1.6 app/controllers/muck/visits_controller.rb
muck-services-0.1.5 app/controllers/muck/visits_controller.rb
muck-services-0.1.4 app/controllers/muck/visits_controller.rb
muck-services-0.1.3 app/controllers/muck/visits_controller.rb
muck-services-0.1.2 app/controllers/muck/visits_controller.rb