Commit 226be609a064dbb031a10f6b387f19525a63a83f
1 parent
eb3bd5ec
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
pairwise: change from lambda to proc
Showing
4 changed files
with
8 additions
and
8 deletions
Show diff stats
plugins/pairwise/lib/pairwise_plugin/pairwise_content.rb
... | ... | @@ -59,7 +59,7 @@ class PairwisePlugin::PairwiseContent < Article |
59 | 59 | embeded = options.has_key? "embeded" |
60 | 60 | prompt_id = options["prompt_id"] |
61 | 61 | pairwise_content = self |
62 | - lambda do | |
62 | + proc do | |
63 | 63 | locals = {:pairwise_content => pairwise_content, :source => source, :embeded => embeded, :prompt_id => prompt_id } |
64 | 64 | render :file => 'content_viewer/prompt', :locals => locals |
65 | 65 | end | ... | ... |
plugins/pairwise/lib/pairwise_plugin/pairwise_question_block.rb
... | ... | @@ -14,7 +14,7 @@ class PairwisePlugin::PairwiseQuestionBlock < Block |
14 | 14 | |
15 | 15 | def content(args={}) |
16 | 16 | block = self |
17 | - lambda do | |
17 | + proc do | |
18 | 18 | pairwise_client = new PairwiseClient(owner.id) |
19 | 19 | question = pairwise_client.get_question(pairwise_question_id) |
20 | 20 | if !question.blank? |
... | ... | @@ -29,4 +29,4 @@ class PairwisePlugin::PairwiseQuestionBlock < Block |
29 | 29 | def cacheable? |
30 | 30 | false |
31 | 31 | end |
32 | -end | |
33 | 32 | \ No newline at end of file |
33 | +end | ... | ... |
plugins/pairwise/lib/pairwise_plugin/questions_group_block.rb
... | ... | @@ -12,7 +12,7 @@ class PairwisePlugin::QuestionsGroupBlock < Block |
12 | 12 | def content(args={}) |
13 | 13 | block = self |
14 | 14 | question = pick_question |
15 | - lambda do | |
15 | + proc do | |
16 | 16 | content = block_title(block.title) |
17 | 17 | content += ( question ? article_to_html(question,:gallery_view => false, :format => 'full').html_safe : _('No Question selected yet.') ) |
18 | 18 | end | ... | ... |
plugins/pairwise/lib/pairwise_plugin/questions_group_list_block.rb
... | ... | @@ -13,13 +13,13 @@ class PairwisePlugin::QuestionsGroupListBlock < Block |
13 | 13 | def content(args={}) |
14 | 14 | block = self |
15 | 15 | questions = questions.shuffle if(questions) |
16 | - #lambda do | |
16 | + #proc do | |
17 | 17 | # content = block_title(block.title) |
18 | 18 | # content += ( question ? article_to_html(question,:gallery_view => false, :format => 'full').html_safe : _('No Question selected yet.') ) |
19 | 19 | #end |
20 | - lambda do | |
21 | - render :file => 'blocks/questions_group_list', :locals => {:block => block} | |
22 | - end | |
20 | + proc do | |
21 | + render :file => 'blocks/questions_group_list', :locals => {:block => block} | |
22 | + end | |
23 | 23 | end |
24 | 24 | |
25 | 25 | def random_sort= value | ... | ... |