28 May, 2015

1 commit

  •   As of Rails 3, include_root_in_json is true by default, which causes
      the json generated for rails models to be in the format:
    
        `{ profile => { name => 'ze', ... } }`
    
      instead of:
    
        `{ name => 'ze', ... }`
    
      This was breaking some javascript for the sniffer plugin and possibly
      other places.
    
      This initializer is part of the template for rails 3 applications and
      set include_root_in_json to false. The default configuration for rails
      3 applications also enables parameters wrapping for json, however I
      disabled this feature by setting wrap parameter format to an empty
      array, as suggested by the documentation, since we are not using this
      on noosfero.
    Larissa Reis