Skip to content

Conversation

@Ptico
Copy link
Member

@Ptico Ptico commented Dec 1, 2014

No description provided.

@Ptico Ptico added the wip label Dec 1, 2014

def initialize(name, pk=nil, associations={})
@name = name
@primary_key = pk.kind_of?(Array) ? pk.map(&:to_sym) : pk.to_sym

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's better for this var to has type Array in any situation.

@primary_key = Array(pk).map(&:to_sym)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants