class StreamsController < ApplicationController include ApplicationHelper def index @streams = Stream.order(latest_post_at: :desc).paginate(page: params[:page], per_page: 10) end def show @stream = Stream.find_by_slug(params[:slug]) @updates = @stream.updates.paginate(page: params[:page], per_page: 10) body = stripped_markdown(@stream.body) set_meta_tags(og: { title: @stream.title, type: "article", description: body[0, 299], url: stream_url(@stream, host: "www.fourisland.com"), article: { published_time: @stream.created_at.iso8601, modified_time: @stream.latest_post_at.iso8601 } }) end end