version one of contact myusa email
Create UserActions mdoel to track user actions

Create a UserActions model, which belongs to User and has an associated record + action.

Also create an AuditWrapper, which makes it easy to add an audit event to a model
remove AppOauthScope model
adding ajax submit for flash message location if JS is enabled and changing wording
Merge remote-tracking branch 'origin/devel' into feature/user_audit

Conflicts:
	config/initializers/doorkeeper.rb
	db/schema.rb
fixing merge conflicts
Refactor Audit class/modules

Extend UserEvent audit methods in ActiveRecord::Base so that any model can call audit_on with minimal boilerplate.
Add remote_ip and created_at to UserAction model

Add remote_ip and created_at to UserAction model. Also add a 'Sweeper' to the
audit classes so that we can intercept a UserAction.create and add remote_ip
(and current_user) to the record. Also add Warden hooks for after_set_user and
before_logout so that we can audit sign_in and sign_out events.
Merge remote-tracking branch 'origin/devel' into feature/user_audit

Conflicts:
	db/schema.rb
remove TODO comment

might as well capture all the data. if we need to filter out ip's later we can.
Make sure AccessToken audit has a User

Doorkeeper::TokensController is using MetalController, rather than
ActionController, so we need to set up a few things there.
Use current_user for auditing

We want to use current_user (which is aliased in the API) for auditing, rather than model users, because the goal is to audit user actions. Users could take action on other users' stuff at some point (maybe an client application is shared?) and we don't want to mess up the audit trail. This makes auditing the AccessToken creation difficult because there is no current_user in that call. We still have the remote_ip, so we can track the client application's server down.
line was commented out while debugging. uncomment it.
Merge remote-tracking branch 'origin/devel' into feature/user_audit
move audit specs to controller tests
More Audit Specs.

- Add test to ensure current user is associated with audit record.
- Add test to ensure remote_ip is set on audit record
clean up unused/redundant code in sign_in_spec
Merge remote-tracking branch 'origin/devel' into feature/user_audit

Conflicts:
	spec/features/devise/sessions/sign_in_spec.rb
Merge pull request #232 from 18F/feature/user_audit

Create UserActions model to track user actions
create action_mailer initializer and move mail config there