search for: partial_name

Displaying 13 results from an estimated 13 matches for "partial_name".

2008 Mar 31
10
Problems with *_path() and *_url() helpers when using Publisher
...ed method `default_url_options'' for ActionView::Base:Class I''ve seen a few other people speak about this issue, yet I haven''t seen any resolution on the mailing list yet. Here is an example stub method that I am using the partial in: def simple_notification(event_data, partial_name) send_as :notification from event_data[:user] recipients event_data[:target_uids] fbml render(:partial => "event/notification/" + partial_name, :event => event_data[:event]) end Note, _path() and _url() helpers work flawlessly from the simple_notification method...
2006 Nov 28
8
view specs with partials
When I first learned about the View specs I was very excited. I still am. However, I haven''t found them useful yet for one reason. They throw the following exception when ever a view renders another view, which is very common. ActionView::TemplateError in ''Event View message'' No rhtml, rxml, rjs or delegate template found for spec/rails/ view_spec/_info
2006 Apr 28
4
can someone help DRY a noob? thanks...
hi all i''m trying to pass a variable name right round the block and need a hand to ease my aching brain. ##in my sidebar i have <li><%= SidebarItem(''catalogue'') %></li> <li><%= SidebarItem(''provenance'') %></li> <li><%= SidebarItem(''status'') %></li> ##linked to a
2006 Nov 30
4
response is null when using should_render_rjs
I''m trying to use rspec to test a controller that has ajax. I have the following action: def change_ad_type_form render :update do |page| page.replace_html ''ad_sub_form'', :partial => ''text'' end end and the following spec: specify "should return Text subform on AJAX request to change_ad_type_form" do
2006 Apr 25
3
how to get the count/index of the current row ?
I have a partial to which i pass a collection. That views name is _row. So row.name, row.ssn gives me the details of each object in the collection, But i need to display 1. name 123456798 2. name1 234567890 how to get that Index ??? or count or whatever in that partial ?? please help. -- Posted via http://www.ruby-forum.com/.
2008 Jul 24
1
How to add link_to_remote element with RJS?
Hello, after executing an action, I add an <li> element to an existing list using a RJS template: page.insert_html :bottom, :contributors, "<li id=''contributor.#{@contributor.id}''>#{@contributor.user.name}</li>" but I need to add an image with a link_to_remote as I have in a partial page: <li id="contributor.<%= contributor.id
2006 Aug 18
7
Rewriting URLs - help needed
Hello - I''m grappling with some tricky URL rewriting with Apache 2 and mod_rewrite, and could use a hand. Briefly: URL for application is: www.servername.com/path/to/app/ There is no Alias directive; the application is in the directory /www/content/path/to/app/ on the server file system. The FastCGI dispatcher (dispatch.fcgi) lives at: /www/fcgi-bin/path/to/app/dispatch.fcgi Inside
2006 Jun 24
3
Staying DRY -- can views share partials?
Let''s say I have a "main" controller/view and a "sub" controller/view. If I have defined a partial in "main" for the site header (_site_header.rhtml) can I share it with "sub" or does "sub" have to duplicate it, use a symbolic link to the file, or convert the cool partial into an ugly helper? It would be nice to have a shared placed
2006 Mar 23
2
ajax replace div
Hi, Using form_remote_tag methode, is there a clean way to directly replace the content of a given div instead of just update it ? If I destroy the content of the div using this code: :success => ''$(\''mydiv'').innerHTML = \''\'''', It works. But it''s not really a clean way... Any suggestions are very welcome.. Thanks. Seb
2009 Oct 15
4
Getting the object in fields_for
I''m using the fields_for helper with accepts_nested_attributes_for The System model has_many children. If I do this in my haml template: -form_for @system do |s| =s.text_field :name -s.fields_for :children do |child_fields| =child_fields.text_field :name all is fine. The fields_for iterates over all children and puts the correct data in the fields. But...what I
2007 Aug 14
12
expect_render, why does there need to be a warning
There is a warning on the web site about expect_render and stub_render: "WARNING: expect_render and stub_render, while very useful, act differently from standard Message Expectations (a.k.a. mock expectations), which would never pass calls through to the real object. This can be very confusing when there are failures if you''re not aware of this fact, because some calls will be
2008 Mar 23
6
Locals do not appear in partial unless collection is explici
Maybe I''m misunderstanding something but it appears as if <%= render :partial => @items, @locals => { :this => ''that'' } %> does not give the local variable this but this one does: <%= render :partial => ''items/item'', :collection => @items, @locals => { :this => ''that'' } %> Shouldn''t they mean
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><%=