Commit 6b366ef4472ce38266f7c4d7c71fd235f73168c5
1 parent
ecc9032a
Exists in
master
and in
20 other branches
rails4: move to is_public scope
Showing
4 changed files
with
4 additions
and
4 deletions
Show diff stats
plugins/event/lib/event_plugin/event_block.rb
@@ -27,7 +27,7 @@ class EventPlugin::EventBlock < Block | @@ -27,7 +27,7 @@ class EventPlugin::EventBlock < Block | ||
27 | 27 | ||
28 | def events(user = nil) | 28 | def events(user = nil) |
29 | events = events_source.events.order('start_date') | 29 | events = events_source.events.order('start_date') |
30 | - events = user.nil? ? events.public : events.display_filter(user,nil) | 30 | + events = user.nil? ? events.is_public : events.display_filter(user,nil) |
31 | 31 | ||
32 | if future_only | 32 | if future_only |
33 | events = events.where('start_date >= ?', Date.today) | 33 | events = events.where('start_date >= ?', Date.today) |
plugins/profile_members_headlines/lib/profile_members_headlines_block.rb
@@ -26,7 +26,7 @@ class ProfileMembersHeadlinesBlock < Block | @@ -26,7 +26,7 @@ class ProfileMembersHeadlinesBlock < Block | ||
26 | end | 26 | end |
27 | 27 | ||
28 | def authors_list | 28 | def authors_list |
29 | - result = owner.members_by_role(filtered_roles).public.includes([:image,:domains,:preferred_domain,:environment]).order('updated_at DESC') | 29 | + result = owner.members_by_role(filtered_roles).is_public.includes([:image,:domains,:preferred_domain,:environment]).order('updated_at DESC') |
30 | 30 | ||
31 | result.all(:limit => limit * 5).select { |p| p.has_headline? | 31 | result.all(:limit => limit * 5).select { |p| p.has_headline? |
32 | }.slice(0..limit-1) | 32 | }.slice(0..limit-1) |
plugins/solr/test/unit/solr_plugin/plugin_test.rb
@@ -9,7 +9,7 @@ class SolrPlugin::PluginTest < ActiveSupport::TestCase | @@ -9,7 +9,7 @@ class SolrPlugin::PluginTest < ActiveSupport::TestCase | ||
9 | 9 | ||
10 | should 'convert scopes to solr filters' do | 10 | should 'convert scopes to solr filters' do |
11 | person = create_user('test').person | 11 | person = create_user('test').person |
12 | - result = plugin.send :scopes_to_solr_filters, person.files.public.published | 12 | + result = plugin.send :scopes_to_solr_filters, person.files.is_public.published |
13 | assert_equal result, ["profile_id:#{person.id}", "published:'true'", "solr_plugin_public:true"] | 13 | assert_equal result, ["profile_id:#{person.id}", "published:'true'", "solr_plugin_public:true"] |
14 | end | 14 | end |
15 | 15 |
plugins/stoa/lib/stoa_plugin/person_api.rb
@@ -35,7 +35,7 @@ class StoaPlugin::PersonApi < Noosfero::FieldsDecorator | @@ -35,7 +35,7 @@ class StoaPlugin::PersonApi < Noosfero::FieldsDecorator | ||
35 | end | 35 | end |
36 | 36 | ||
37 | def communities | 37 | def communities |
38 | - object.communities.public.map {|community| {:url => profile_homepage(context, community), :name => community.name}} | 38 | + object.communities.is_public.map {|community| {:url => profile_homepage(context, community), :name => community.name}} |
39 | end | 39 | end |
40 | 40 | ||
41 | private | 41 | private |