Skip to content

Commit

Permalink
underscore parend class
Browse files Browse the repository at this point in the history
  • Loading branch information
superp committed Sep 24, 2014
1 parent 84b0518 commit 37c8c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sunrise/abstract_model.rb
Expand Up @@ -80,7 +80,7 @@ def parent_record

# Convert parent id and class name into hash
def parent_hash
@parent_hash ||= { :parent_id => parent_record.id, :parent_type => parent_record.class.name } if parent_record
@parent_hash ||= { :parent_id => parent_record.id, :parent_type => parent_record.class.name.underscore } if parent_record
@parent_hash ||= {}
end

Expand Down Expand Up @@ -301,4 +301,4 @@ def parent_present?
!(@request_params[:parent_id].blank? || @request_params[:parent_type].blank?)
end
end
end
end

0 comments on commit 37c8c40

Please sign in to comment.