lib/controllers/logs.rb in wackamole-0.0.6 vs lib/controllers/logs.rb in wackamole-0.0.7
- old
+ new
@@ -19,11 +19,11 @@
post "/logs/search" do
begin
@filter.search_terms = params[:search_filter][:search_terms]
@logs = Wackamole::Log.paginate( @filter.to_conds )
rescue => boom
- puts boom
+ # puts boom
flash_it!( :error, boom )
@logs = [].paginate
end
erb :"logs/filter.js", :layout => false
@@ -41,18 +41,9 @@
post "/logs/filter" do
@filter = Wackamole::SearchFilter.new
@filter.from_options( params[:filter] )
session[:filter] = @filter
- # elapsed = Benchmark.realtime do
- @logs = Wackamole::Log.paginate( @filter.to_conds )
- # end
- # puts "Filter logs %5.4f" % elapsed
-
- out = nil
- # elapsed = Benchmark.realtime do
- out = erb :"logs/filter.js", :layout => false
- # end
- # puts "Render logs %5.4f" % elapsed
- out
+ @logs = Wackamole::Log.paginate( @filter.to_conds )
+ erb :"logs/filter.js", :layout => false
end
end
\ No newline at end of file