Fix/application css not found

Updated to support both attr_accessible for rails 3.2 and strong params in rails 4+
Fixed issues with searching by a polymorphic association