Skip to content

Conversation

@darinpp
Copy link

@darinpp darinpp commented Dec 20, 2016

The current code modifies the config returned by TablePrint::Config.for so calling TablePrint::Config.set works only once:

pry(main)> TablePrint::Config.set(Entry, include: ['entry_type','account.name'])
=> {:include=>["entry_type", "account.name"]}
pry(main)> tp Entry.last(10)
... shows the entry_type and account.name columns
pry(main)> tp Entry.last(10)
... doesn't show the entry_type and account.name columns anymore

This PR changes the for to return a copy of the config so it doesn't get cleared.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant