search for: formatted_question

Displaying 3 results from an estimated 3 matches for "formatted_question".

2010 Aug 31
6
ajax and partials
...a => answer_list[0][0], :answer_b => answer_list[1][0], :answer_c => answer_list[2][0], :answer_d => answer_list[3][0], :answer_e => answer_list[4][0] } formatted end In the controller: @question = Question.find(params[:id]) @formatted_question = @question.set_format_for_presentation In the view: <% form_for(@formatted_question, :url => "controller => question", :action => "show") do |f| %> <div id="questionpict"> <p> <%= image_tag @question.question_pict, :alt => &q...
2013 Jan 27
2
Help displaying text
Apologies in advance ...this may be a really dumb question but here goes. @formatted_question[:a] contains text with HTML markup. I want to display it in a field so I can control its vertical and horizontal size on the page. When it is displayed on the page now, rather than interpreting the HTML, it is output into the text field as a string with all HTML tags showing. What am I doing wron...
2013 Jan 23
0
wysihtml5 for rails
...ccasions and more importantly need to set it to a read only mode on a particular page so users can click on URL''s in the WYSIWYG text area. My current setup... gem ''wysihtml5-rails'' in gemfile In "show'' page... <%= text_area_tag id="ck_a", @formatted_question[:anno_a], :class=>''wysihtml5'' %> <script type="text/javascript"> $(''.wysihtml5'').each(function(i, elem) { $(elem).wysihtml5(); }); </script> Also, not sure why but only works when <script typ...