search for: some_partial

Displaying 4 results from an estimated 4 matches for "some_partial".

2007 Aug 29
2
assign local variable instead of instance variable.
Hello, I have a view that generates a list of adverts with <%= render :partial => ''advert'', :collection => @adverts %> I have the render call described with @controller.template.should_receive(:render).with(:partial => ''advert'', :collection => @adverts) Bu when i was about to describe my partial i got stuck. My partial _advert.rhtml:
2008 Dec 13
2
What is "The Rails Way" to do this?
I have a PHP application with the following in one of the "views": <input type="button" onClick="newAlt()" value=" + "></nobr> The JavaScript for "newAlt()" is: // using DOM create new input box for alternate part function newAlt() { var html = "<input style=''background-color:#FFFFCC'' "; html +=
2006 Mar 18
9
RJS - not working in IE
...(for evalScripts support) Monkeypatched in_place_editor to support evalScripts I have just started using RJS, and I have two .rjs templates. They are quite simple, each template has two page.replace_html statements, which look like: page.replace_html "some_id", :partial => "some_partial" page.replace_html "some_other_id", :partial => "some_other_partial" These rjs templates work fine in Safari on Mac, Firefox on Mac, Firefox on Windows. But they fail to work on Internet Explorer on Windows. They fail in exactly the same way. The first page.repla...
2010 Jun 24
0
Rails3: render_to_string of a .html.erb when request is a json request raises MissingTemplate error
...able). On the clientside there''s a script that does a json request for a specific row (jQuery + ajax dataType: ''json'' and type: ''POST'') In the controller I do: render :json => { :success => true, :p => render_to_string(:partial => ''some_partial'') } Then the ajax result handler replaces the row with the data from the json result. This is 100% functional code in rails 2.3.8, but raises MissingTemplate exception: ActionView::MissingTemplate (Missing partial employees/ employee_list_row_data with {:handlers=>[:haml, :builder, :...