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

Ignore some instance variables #145

Merged
merged 3 commits into from
Mar 24, 2013
Merged

Ignore some instance variables #145

merged 3 commits into from
Mar 24, 2013

Conversation

Sephi-Chan
Copy link
Contributor

Here is a feature to ignore some instance variables on the error page.

It can be used like this (in a Rails initializer for instance):

if defined?(BetterErrors) && Rails.env.development?
  BetterErrors::ErrorPage.ignored_instance_variables += [ :@_request ]
end

@haileys
Copy link
Collaborator

haileys commented Mar 20, 2013

Nice, I like this idea.

The only problem I have with it is that you're exposing what's intended to be a public API on a class marked as private. I would prefer if configuration like this was kept on BetterErrors, which is marked as public and documented.

@Sephi-Chan
Copy link
Contributor Author

Ok. I will see to fix that.

Are you okay with the testing? I'm not a big fan of including HTML but since the variable names and values are in the exception text, it makes difficult to test the absence of the name.

@haileys
Copy link
Collaborator

haileys commented Mar 20, 2013

Yeah the test's fine

@Sephi-Chan
Copy link
Contributor Author

Here is the fix. :)

@goodtouch
Copy link

👍

1 similar comment
@dixiS
Copy link

dixiS commented Mar 22, 2013

👍

haileys pushed a commit that referenced this pull request Mar 24, 2013
@haileys haileys merged commit 0da0c14 into BetterErrors:master Mar 24, 2013
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.

4 participants