Skip to content
Browse files

Updated to be compatible with latest rails master

  • Loading branch information...
1 parent 8c1d597 commit 2535b2be9bb2d79b80261e77bbbdeb8184143c82 @snusnu snusnu committed
View
2 app/views/rails_metrics/_request.html.erb
@@ -1,4 +1,4 @@
-<% rails_metrics_table_row_for metric do %>
+<%= rails_metrics_table_row_for metric do %>
<td class="when">
<%= metric.started_at.strftime("%d %b %H:%M:%S") %>
</td>
View
2 app/views/rails_metrics/_row.html.erb
@@ -1,4 +1,4 @@
-<% rails_metrics_table_row_for metric do %>
+<%= rails_metrics_table_row_for metric do %>
<% unless (skip_timestamps ||= false) %>
<td class="started_at">
<%= metric.started_at.strftime("%d %b %H:%M:%S") %>
View
2 app/views/rails_metrics/all.html.erb
@@ -4,7 +4,7 @@
<% content_for(:rails_metrics_header) do %>
<%= pagination_and_scopes_info(:metrics) %>
- <% form_tag url_for(params.merge(:action => "destroy_all")), :method => :delete do %>
+ <%= form_tag url_for(params.merge(:action => "destroy_all")), :method => :delete do %>
<%= submit_tag "Delete all", :onclick => "return confirm('Are you sure you want to delete those #{@metrics_count} metrics?')" %>
<% end %>
<% end %>
View
2 lib/rails_metrics.rb
@@ -18,7 +18,7 @@ module ORM
# RailsMetrics.set_store { Metric }
#
def self.set_store(&block)
- metaclass.send :define_method, :store, &block
+ singleton_class.send :define_method, :store, &block
end
# Place holder for the store.
View
5 lib/rails_metrics/engine.rb
@@ -1,8 +1,9 @@
module RailsMetrics
class Engine < ::Rails::Engine
- engine_name :rails_metrics
# Initialize configure parameters
+ config.rails_metrics = ActiveSupport::OrderedOptions.new
+
config.rails_metrics.ignore_lambdas = {}
config.rails_metrics.ignore_patterns = [ "action_controller.start_processing" ]
@@ -27,4 +28,4 @@ class Engine < ::Rails::Engine
end
end
end
-end
+end

0 comments on commit 2535b2b

Please sign in to comment.
Something went wrong with that request. Please try again.