Improve MembershipController#new test
Add a missing class method to Membership

(this custom method can be called in a view).
Format
Clean up before upgrading to Rails 4.0
Use shorter db index names

Use db index names of at most 62 characters because the maximal allowed
length has decreased by 2 in Rails 4.
Upgrade to Rails 4.0 -- initial phase
Upgrade to Rails 4.0 WIP
Use association names instead of SQL in 'joins'

Use association name symbols instead of string SQL in 'joins' for defining scopes.  I have not debugged it, but it seems Rails 4.0 stopped working in some cases with SQL strings in 'joins' method.
Use 'includes' for LEFT JOIN for Rails 4

Rails 4 does not seem to accept string SQL conditions for 'joins' method.  Use 'includes' with the new API.
Adjust custom form builder to Rails 4 - WIP
Do not use symbols as params keys
Do not use symbols as params keys in tests
Small simplification in UserController#update
Move AdminController to Admin module
Implement more params processing