Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add igonre table config for show#tables #70

Merged
merged 2 commits into from
Sep 9, 2015

Conversation

takkanm
Copy link
Contributor

@takkanm takkanm commented Sep 8, 2015

I have prepared the settings that you can specify the table name that
you do not want to appear in the table list.

For example,

  config.ignore_table_names = %w(SecretTable)

The specified table will not appear in the table list.

I have prepared the settings that you can specify the table name that
you do not want to appear in the table list.

For example,
```
  config.ignore_table_names = %w(SecretTable)
```

The specified table will not appear in the table list.
@moro
Copy link
Contributor

moro commented Sep 8, 2015

Hmmm, ActiveRecord class IS NOT identical with tables.

I'm wondering the things we want to hide(or ignore) is whether table or AR model.

If you use ignore_table_names option name, then it should be written as secret_tables.
Or if you prefer to specify AR class, the option should be called like hidden_activerecord_tables, include 'activerecord' (sounds terrible)

@joker1007
Copy link
Collaborator

My opinion of option name

  • hidden_model_classes
  • hidden_model_names

@ar_classes = ActiveRecord::Base.subclasses.
reject {|klass| klass.name == 'ActiveRecord::SchemaMigration' }.
reject {|klass| ignore_table_names.include?(klass.name) }.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that abstract_class model should be filtered too.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

create new issue. #71

@moro
Copy link
Contributor

moro commented Sep 8, 2015

hidden_model_names

It sounds good. How do you think about this? @takkanm

@takkanm
Copy link
Contributor Author

takkanm commented Sep 8, 2015

hidden_model_names
It sounds good. How do you think about this? @takkanm

me too. thx @joker1007 .

@joker1007
Copy link
Collaborator

LGTM 👍

moro added a commit that referenced this pull request Sep 9, 2015
@moro moro merged commit 819df66 into master Sep 9, 2015
@moro moro deleted the ignore_table_config_for_show_tables branch September 9, 2015 04:29
takkanm added a commit that referenced this pull request Oct 15, 2015
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.

3 participants