diff --git a/app/models/folder.rb b/app/models/folder.rb
index c3b8d9f..03ea3b8 100644
--- a/app/models/folder.rb
+++ b/app/models/folder.rb
@@ -35,7 +35,7 @@ class Folder < Article
include ActionView::Helpers::TagHelper
def to_html(options = {})
folder = self
- lambda do
+ proc do
render :file => 'content_viewer/folder', :locals => {:folder => folder}
end
end
diff --git a/app/models/forum.rb b/app/models/forum.rb
index 0298487..f25b3e9 100644
--- a/app/models/forum.rb
+++ b/app/models/forum.rb
@@ -17,7 +17,7 @@ class Forum < Folder
include ActionView::Helpers::TagHelper
def to_html(options = {})
- lambda do
+ proc do
render :file => 'content_viewer/forum_page'
end
end
diff --git a/app/models/gallery.rb b/app/models/gallery.rb
index c4d9480..2940182 100644
--- a/app/models/gallery.rb
+++ b/app/models/gallery.rb
@@ -15,7 +15,7 @@ class Gallery < Folder
include ActionView::Helpers::TagHelper
def to_html(options={})
article = self
- lambda do
+ proc do
render :file => 'content_viewer/image_gallery', :locals => {:article => article}
end
end
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb
index c7e6f32..23ad38e 100644
--- a/test/functional/account_controller_test.rb
+++ b/test/functional/account_controller_test.rb
@@ -770,12 +770,12 @@ class AccountControllerTest < ActionController::TestCase
should 'add extra content on signup forms from plugins' do
class Plugin1 < Noosfero::Plugin
def signup_extra_contents
- lambda {"Plugin1 text"}
+ proc {"Plugin1 text"}
end
end
class Plugin2 < Noosfero::Plugin
def signup_extra_contents
- lambda {"Plugin2 text"}
+ proc {"Plugin2 text"}
end
end
@@ -885,12 +885,12 @@ class AccountControllerTest < ActionController::TestCase
should 'add extra content on login form from plugins' do
class Plugin1 < Noosfero::Plugin
def login_extra_contents
- lambda {"Plugin1 text"}
+ proc {"Plugin1 text"}
end
end
class Plugin2 < Noosfero::Plugin
def login_extra_contents
- lambda {"Plugin2 text"}
+ proc {"Plugin2 text"}
end
end
diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb
index 2e261b3..ef7e8fc 100644
--- a/test/functional/application_controller_test.rb
+++ b/test/functional/application_controller_test.rb
@@ -516,7 +516,7 @@ class ApplicationControllerTest < ActionController::TestCase
{ :type => 'before_filter',
:method_name => 'filter_plugin',
:options => {:only => 'some_method'},
- :block => lambda {'plugin block called'} }
+ :block => proc {'plugin block called'} }
end
end
diff --git a/test/functional/catalog_controller_test.rb b/test/functional/catalog_controller_test.rb
index 8150450..abe46e0 100644
--- a/test/functional/catalog_controller_test.rb
+++ b/test/functional/catalog_controller_test.rb
@@ -82,13 +82,13 @@ class CatalogControllerTest < ActionController::TestCase
should 'include extra content supplied by plugins on catalog item extras' do
class Plugin1 < Noosfero::Plugin
def catalog_item_extras(product)
- lambda {"This is Plugin1 speaking!"}
+ proc {"This is Plugin1 speaking!"}
end
end
class Plugin2 < Noosfero::Plugin
def catalog_item_extras(product)
- lambda {"This is Plugin2 speaking!"}
+ proc {"This is Plugin2 speaking!"}
end
end
diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb
index 8e02a2f..6bb44e2 100644
--- a/test/functional/content_viewer_controller_test.rb
+++ b/test/functional/content_viewer_controller_test.rb
@@ -1229,14 +1229,14 @@ class ContentViewerControllerTest < ActionController::TestCase
should 'add extra content on comment form from plugins' do
class Plugin1 < Noosfero::Plugin
def comment_form_extra_contents(args)
- lambda {
+ proc {
hidden_field_tag('comment[some_field_id]', 1)
}
end
end
class Plugin2 < Noosfero::Plugin
def comment_form_extra_contents(args)
- lambda {
+ proc {
hidden_field_tag('comment[another_field_id]', 1)
}
end
diff --git a/test/functional/home_controller_test.rb b/test/functional/home_controller_test.rb
index 3f48d99..9ebff98 100644
--- a/test/functional/home_controller_test.rb
+++ b/test/functional/home_controller_test.rb
@@ -99,12 +99,12 @@ class HomeControllerTest < ActionController::TestCase
should 'provide a link to make the user authentication' do
class Plugin1 < Noosfero::Plugin
def alternative_authentication_link
- lambda {"Plugin1 link"}
+ proc {"Plugin1 link"}
end
end
class Plugin2 < Noosfero::Plugin
def alternative_authentication_link
- lambda {"Plugin2 link"}
+ proc {"Plugin2 link"}
end
end
diff --git a/test/functional/manage_products_controller_test.rb b/test/functional/manage_products_controller_test.rb
index 7f91835..835c888 100644
--- a/test/functional/manage_products_controller_test.rb
+++ b/test/functional/manage_products_controller_test.rb
@@ -440,12 +440,12 @@ class ManageProductsControllerTest < ActionController::TestCase
should 'include extra content supplied by plugins on products info extras' do
class TestProductInfoExtras1Plugin < Noosfero::Plugin
def product_info_extras(p)
- lambda {"This is Plugin1 speaking!"}
+ proc {"This is Plugin1 speaking!"}
end
end
class TestProductInfoExtras2Plugin < Noosfero::Plugin
def product_info_extras(p)
- lambda { "This is Plugin2 speaking!" }
+ proc { "This is Plugin2 speaking!" }
end
end
diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb
index 113f4aa..75598d6 100644
--- a/test/functional/profile_controller_test.rb
+++ b/test/functional/profile_controller_test.rb
@@ -1235,13 +1235,13 @@ class ProfileControllerTest < ActionController::TestCase
should 'display plugins tabs' do
class Plugin1 < Noosfero::Plugin
def profile_tabs
- {:title => 'Plugin1 tab', :id => 'plugin1_tab', :content => lambda { 'Content from plugin1.' }}
+ {:title => 'Plugin1 tab', :id => 'plugin1_tab', :content => proc { 'Content from plugin1.' }}
end
end
class Plugin2 < Noosfero::Plugin
def profile_tabs
- {:title => 'Plugin2 tab', :id => 'plugin2_tab', :content => lambda { 'Content from plugin2.' }}
+ {:title => 'Plugin2 tab', :id => 'plugin2_tab', :content => proc { 'Content from plugin2.' }}
end
end
diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb
index a9efb4f..946cbf2 100644
--- a/test/functional/profile_editor_controller_test.rb
+++ b/test/functional/profile_editor_controller_test.rb
@@ -902,12 +902,12 @@ class ProfileEditorControllerTest < ActionController::TestCase
should 'add extra content on person info from plugins' do
class Plugin1 < Noosfero::Plugin
def profile_info_extra_contents
- lambda {"Plugin1 text"}
+ proc {"Plugin1 text"}
end
end
class Plugin2 < Noosfero::Plugin
def profile_info_extra_contents
- lambda {"Plugin2 text"}
+ proc {"Plugin2 text"}
end
end
@@ -923,12 +923,12 @@ class ProfileEditorControllerTest < ActionController::TestCase
should 'add extra content on organization info from plugins' do
class Plugin1 < Noosfero::Plugin
def profile_info_extra_contents
- lambda {"Plugin1 text"}
+ proc {"Plugin1 text"}
end
end
class Plugin2 < Noosfero::Plugin
def profile_info_extra_contents
- lambda {"Plugin2 text"}
+ proc {"Plugin2 text"}
end
end
--
libgit2 0.21.2