search for: my_parti

Displaying 12 results from an estimated 12 matches for "my_parti".

Did you mean: my_partial
2006 Jul 20
6
replace_html + javascript
Hi all, This is my first post to the list, so I hope it gets through and I don''t do anything wrong :) Here''s the issue I''m having... I have an rjs that''s doing: page.replace_html ''myid'', :partial => ''my_partial'' And in my my_partial I have: <script type="text/javascript"> alert(''foo''); </script> And this breaks my replace_html, and I get a javascript error in firebug that looks like it''s not escaping it right. Does anyone else experience...
2006 May 08
17
partial problem
def my_controller @variable = [{''myfield''=>''grey''},{''myfield''=>''blue''}] end #-------------------------my_view <table> <%= render :partial=>''my_partial, :collection=>@variable %> </table> #----------------------_my_partial <tr> <td><%= my_partial[''myfield''] %> </td> </tr> I would have expected the view to print out grey, blue. However the my_partial local variable in _my_partial come...
2006 Jul 13
6
Render partial questions
Hello, what is the preferred way to do this... I have 2 controllers. Each has an index action. Now I want to include the rendered index view from TwoController in the index view of OneController. But a render :partial doesn''t execute the TwoController index action which sets variables for its index view. So maybe you can give me a short example how to do it. Thank you Markus
2006 Apr 08
7
text_field and arrays
Hi, I''m trying to do a bulk update on an array with the helper text_field. I''m trying to create an inputfield for every object in the array, but I''m not getting it right... example: class ClassA @arrayB[] end HTML (code with error): <% 0.upto(9) do |index| %> <%= text_field ''ClassA'', ''arrayB[index]'' %> non
2006 Apr 13
2
acess local variables from helper?
if I call a helper method from inside a partial, it doesn''t appear to have access to the partials local variables. is there a way to make them avilable without passing them as parameters? here''s a simple example # in the view <%= render :partial => "my_partial", :locals => :value => 2%> # _my_partial.rhtml - raises "undefined local variable or method `value''" <%= show_value %> # helper method def show_value value end
2008 Feb 29
0
RJS and EXTjs component update (RAILS 1.2.3)
...ids, I can''t see how to use ''page.replace_html''. So instead I wrote a javascript function ''updateBody''. In the RJS view, I want to say something like: page.call ''updateBody'', ''some_panel'', :partial => ''my_partial'' I looked at the source for replace_html, and then tried: page.call ''updateBody'', ''some_panel'', page.render(:partial => ''my_partial'') but that doesn''t work, and neither does: page.call ..., render_to_string(...) Ren...
2006 Jun 22
4
rendering partials in layouts?
Hello all, Forgive me if this is a really stupid question. How do you render partials in a layout? It''s probably way easier than i believe it to be. thanks! -- Posted via http://www.ruby-forum.com/.
2006 May 31
3
Should partials have access to the same var''s as the view?
I have a view, part of it I put in to a partial - a copy paste - but now I get an error saying that there is an "undefined local variable or method" in the partial code... Do I need to pass my var to the partial, I would have though not? Cheers AFM -- Posted via http://www.ruby-forum.com/.
2009 Apr 28
0
google adsense breaks render :partial =>
...ript for my adsense account. Then the partial renders correctly, and then quickly replaces my page with nothing by the ad. When i take away my adsense js, everything works great. Has anyone encountered this before, or know how to get around it? def submit_remote_form render :partial => "my_partial" end #views /my_partial <% remote_form_for :action => :submit_remote_form do |f| %> <%= f.text_field :something %> <%= f.submit "submit" %> <script type="text/javascript"><!-- google_ad_client = ""; /* WhySpam Squ...
2006 Jul 17
3
trouble with render :partial from controller
...n rails here. My very first attempt has gone well up until this point, but for some reason, when I try to do a render partial, I''m getting a full screen refresh. I did a render partial just fine from an rhtml file. This problem is specifically when calling render :partial => "my_partial" from the controller''s .rb code. It''s just really one line that is not doing what it''s supposed to... render :partial => "my_partial_file" It is indeed finding the file (_my_partial_file.rhtml) and rendering it, but it is not doing it as a pa...
2006 Aug 01
2
Partial Naming Madness
Hi, I am having the following issue with a partial. During initial page load, I am doing a "render_partial_collect ''foo'', @foos", and all goes well. Each foo partial makes use of a variable inside called ''foo'' (and can get foo.id etc). After all the partials are loaded, I need to :update a div corresponding to one of the partials (ie re-load the
2007 Mar 14
3
A place to put common partial templates and RJS files?
Greetings, I have a partial template file (acutally, it is an RJS file but the same principle is in question here) which I wish to "share" between multiple controllers. Does anyone know where in the directory tree I would put these files in order that I can access them from multiple controllers in the same app? I really would prefer not having to copy them all into all of the