Commit 6c114d19 authored by Braulio Bhavamitra's avatar Braulio Bhavamitra
Browse files

favorite_enterprises: fix typo (fix product_test)

parent b439f1f7
class FavoriteEnterprisesController < MyProfileController
# protect 'manage_favorite_enteprises', :profile
# protect 'manage_favorite_enterprises', :profile
requires_profile_class Person
def index
@favorite_enterprises = profile.favorite_enterprises
end
......@@ -12,7 +12,7 @@ class FavoriteEnterprisesController < MyProfileController
@favorite_enterprise = Enterprise.find(params[:id])
if request.post? && params[:confirmation]
profile.favorite_enterprises << @favorite_enterprise
redirect_to :action => 'index'
redirect_to :action => 'index'
end
end
......
......@@ -14,7 +14,7 @@ p. Find on top of page the term "Enterprises" and click on it:
h2(#description). Description
# Fill in the search field with what you want to look for and click on "Search" !=/images/doc/enterprises-search-field.en.png(Enterprises search field)!
# Then you will see the search results. To see more results, click on the pages below the search results. !=/images/doc/enterprises-search-results-with-example.en.png(Enteprises search results with example)!
# Then you will see the search results. To see more results, click on the pages below the search results. !=/images/doc/enterprises-search-results-with-example.en.png(Enterprises search results with example)!
# Clicking on one of the search results, you will be redirected to the homepage of choosen enterprise.
h3. More options
......
......@@ -25,7 +25,7 @@ class NotifyActivityToProfilesJob < Struct.new(:tracked_action_id)
if tracked_action.user.is_a? Organization
ActionTrackerNotification.connection.execute "insert into action_tracker_notifications(profile_id, action_tracker_id) " +
"select distinct accessor_id, #{tracked_action.id} from role_assignments where resource_id = #{tracked_action.user.id} and resource_type='Profile' " +
if tracked_action.user.is_a? Enterprise then "union select distinct person_id, #{tracked_action.id} from favorite_enteprises_people where enterprise_id = #{tracked_action.user.id}" else "" end
if tracked_action.user.is_a? Enterprise then "union select distinct person_id, #{tracked_action.id} from favorite_enterprise_people where enterprise_id = #{tracked_action.user.id}" else "" end
end
if target.is_a?(Community)
......
......@@ -2762,7 +2762,7 @@ msgstr ""
#. type: Attribute 'alt' of: <ol><li><img>
#: doc/noosfero/navigation/searching-enterprises.en.xhtml:14 doc/noosfero/navigation/searching-enterprises.en.xhtml:14
msgid "Enteprises search results with example"
msgid "Enterprises search results with example"
msgstr ""
#. type: Content of: <ol><li>
......
......@@ -326,7 +326,7 @@ class CategoryTest < ActiveSupport::TestCase
assert_equivalent [c1, c2], c.communities
end
should 'have products through enteprises' do
should 'have products through enterprises' do
product_category = fast_create(ProductCategory, :name => 'Products', :environment_id => Environment.default.id)
c = @env.categories.build(:name => 'my category'); c.save!
ent1 = fast_create(Enterprise, :identifier => 'enterprise_1', :name => 'Enterprise one')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment