Sha256: 7f2aba545e87b8cc092fedf1dd94028c3bebeba3e7a09e25576af5b583f25c26

Contents?: true

Size: 486 Bytes

Versions: 23

Compression:

Stored size: 486 Bytes

Contents

module ActiveMetadata
  class StreamController < ApplicationController

    layout false

    def index
      @document = params[:model_name].to_class.find(params[:model_id])
      @stream = @document.stream_for params[:field_name]
    end

    def index_by_group
      @stream = ActiveMetadata::Stream.by_group params[:group], starred_condition
      render :index
    end

    private
    def starred_condition
      params[:starred].nil? ? nil : {:starred => true}
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
active_metadata-0.7.3 app/controllers/active_metadata/stream_controller.rb
active_metadata-0.7.2 app/controllers/active_metadata/stream_controller.rb
active_metadata-0.7.1 app/controllers/active_metadata/stream_controller.rb