Skip to content

Conversation

@deeeki
Copy link
Collaborator

@deeeki deeeki commented Jun 22, 2014

handy interface for configuring :except and :only discussed #18 and asakusa.rb meetup.

# Usage
DatabaseRewinder.filter_options = { except: ["foos"] }
DatabaseRewinder.clean_all

I named filter_options=, but I'll leave other candidates 📝

  • filter_settings
  • filtered_tables
  • filtered_table_options
  • filter_table_options
  • table_options
  • tables_to_filter
  • filtering_options
  • filtering

Choose a reason for hiding this comment

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

how about this one? which I think more rubyish way

@cleaners.each {|c| c.only, c.except = Array(@only), Array(@except) }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

make sense 👍 changed and force pushed. thanks!

@estevaoam
Copy link

Hey guys, is this happening or what? This is very important. 👍

@mknapik
Copy link

mknapik commented Jan 20, 2016

👍 for merging. It'll be very useful.

@scarfacedeb
Copy link

Any news on this one?

@amatsuda
Copy link
Owner

I agree that we need this interface. I'd love to merge this as soon as we come up with a good name.
Any more suggestions?

@scarfacedeb
Copy link

What about plain DatabaseRewinder.tables = {}?

@estevaoam
Copy link

Both DatabaseRewinder.tables and DatabaseRewinder.filter_table_options are good names.
Nevertheless, the functionality is way more important than the naming IMO.

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.

6 participants