[Git][noosfero/noosfero][master] 2 commits: api: add attribute in blocks to store visualization settings
Leandro Nunes
gitlab at mg.gitlab.com
Tue Dec 6 12:56:58 BRST 2016
Leandro Nunes pushed to branch master at Noosfero / noosfero
Commits:
ed9cf642 by Victor Costa at 2016-12-05T11:19:33-03:00
api: add attribute in blocks to store visualization settings
- - - - -
3aa953a1 by Leandro Nunes at 2016-12-06T14:56:52+00:00
Merge branch 'api-block-visualization' into 'master'
api: add attribute in blocks to store visualization settings
See merge request !1065
- - - - -
1 changed file:
- app/models/block.rb
Changes:
=====================================
app/models/block.rb
=====================================
--- a/app/models/block.rb
+++ b/app/models/block.rb
@@ -2,7 +2,7 @@ class Block < ApplicationRecord
attr_accessible :title, :subtitle, :display, :limit, :box_id, :posts_per_page,
:visualization_format, :language, :display_user,
- :box, :edit_modes, :move_modes, :mirror
+ :box, :edit_modes, :move_modes, :mirror, :visualization
include ActionView::Helpers::TagHelper
@@ -20,6 +20,8 @@ class Block < ApplicationRecord
extend ActsAsHavingSettings::ClassMethods
acts_as_having_settings
+ settings_items :visualization, :type => Hash, :default => {}
+
scope :enabled, -> { where :enabled => true }
after_save do |block|
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/caa05c2ba9b5c9c087cce2b07d2ee5e173ac3524...3aa953a12645a36622ec20a5234f0ed09c1501b3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20161206/e212d32d/attachment-0001.html>
More information about the Noosfero-dev
mailing list