check respond_to? instead of accessible_attributes.blank? for rails4