Skip to content

Commit

Permalink
Merge pull request #1 from askelof/rails4
Browse files Browse the repository at this point in the history
rails 4対応
  • Loading branch information
cctiger36 committed Jan 14, 2014
2 parents 2b2215f + 1544b43 commit be58a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model_observer/metric.rb
Expand Up @@ -4,7 +4,7 @@ class Metric

def initialize(model, started_at, ended_at)
@model_class = model.class
@model_id = model.__send__(model.class.primary_key)
@model_id = model.__send__(model.class.primary_key) if model.class.primary_key
@started_at = started_at
@ended_at = ended_at
end
Expand Down

0 comments on commit be58a56

Please sign in to comment.