Skip to content
New issue

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

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

Already on GitHub? # to your account

Log unpermitted parameters #154

Merged
merged 4 commits into from
Nov 21, 2015
Merged

Log unpermitted parameters #154

merged 4 commits into from
Nov 21, 2015

Conversation

aripollak
Copy link
Contributor

Fixes #152.
This will only log if config.action_controller.action_on_unpermitted_parameters = :log.
This PR also refactors LogSubscriber to make rubocop happy.

def logger
Lograge.logger.presence || super
end

private

def extract_request(payload)
def extract_request(event, payload)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW the data building & the associated private methods could be extracted into an inline class to separate it from the LogSubscriber messages, but I wasn't sure how far it would be worth taking this refactor.

@benlovell
Copy link
Collaborator

Thanks! Would you mind updating the change log? This is looking good to merge. ❤️

@aripollak
Copy link
Contributor Author

Done!

benlovell added a commit that referenced this pull request Nov 21, 2015
@benlovell benlovell merged commit 4d49ac4 into roidrage:master Nov 21, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants