Merge pull request #1824 from YusiFan/rails4_new

Wrap condition,order etc in a proc or lambda. Limit sass-rails to 4.0.1,limit sprockets to 2.11.0
Merge pull request #1833 from YusiFan/rails4_new

Remove parentheses with where
load grouping model before ta_memberships