Sha256: 27a540950bf78bbb4f5fa88babce40e5b66900675114f270550708a5533a084c
Contents?: true
Size: 584 Bytes
Versions: 5
Compression:
Stored size: 584 Bytes
Contents
class Streamit::StreamsController < ApplicationController delegate :store, :to => Streamit before_filter :process_params, :only => :fetch layout nil def fetch respond_to do |format| format.html format.js { render :text => render_to_string(@streams) } end end private def process_params @streams = [:ago, :limit].inject(store) do |memo, sym| case sym when :limit params[sym] ? memo.send(sym, params[sym].to_i) : memo else params[sym] ? memo.send(sym, params[sym]) : memo end end end end
Version data entries
5 entries across 5 versions & 1 rubygems