noosfero | fixes for google_analytics_plugin (#544)

Bráulio Bhavamitra gitlab at gitlab.com
Tue Apr 14 14:45:53 BRT 2015


New comment for Merge Request 544

https://gitlab.com/noosfero/noosfero/merge_requests/544#note_1085575


Bráulio Bhavamitra

yeah, I took a looong time to fix that problem... `attr_accessible` uses `class_attribute` to save the list of attributes, and it saves the values per class, so you need also to apply it to `Person`, `Community`, etc. A code that might be useful:

```ruby
require_dependency 'community'
# attr_accessible must be defined on subclasses
Profile.descendants.each do |subclass|
  subclass.class_eval do
    attr_accessible :consumers_coop_settings
    attr_accessible :consumers_coop_header_image_builder
  end 
end
```

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150414/5504e7db/attachment.html>


More information about the Noosfero-dev mailing list