similar to: can''t get render... :collection to work ??

Displaying 20 results from an estimated 20000 matches similar to: "can''t get render... :collection to work ??"

2007 Aug 02
2
Do the :attributes and :content matchers work
[Rails plugin 1.0.5] Hi, I am looking for some guidance. When working on a partial which looks like this <div class="bug" style="width: 100%;" /> I have some examples which should fail - I think - but do not: it '' should fail'' do response.should have_tag( ''div.bug'', :content => ''There is no
2006 May 03
2
render partial collection
my view contains a call to a partial: <%= render(:partial => ''item_list'', :collection => @keyword.synonyms, :locals => { :action_delete => "removesynonym", and_some_other_stuff }) %> _item_list.rhtml contains: <%= link_to ( image_tag(''/images/deletebutton.png''), { :action => action_delete, :id =>
2006 May 03
0
render partial collection passing property
my view contains a call to a partial: <%= render(:partial => ''item_list'', :collection => @keyword.synonyms, :locals => { :action_delete => "removesynonym", and_some_other_stuff }) %> _item_list.rhtml contains: <%= link_to ( image_tag(''/images/deletebutton.png''), { :action => action_delete, :id =>
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines : partial = render_to_string( :partial => "#{file}", :formats => [:html] ) to the pagination_partials function. ================================================= WORKING CODE: ================================================= def render_format_search_partial(file, options={}) # TODO remove this line to use the one
2006 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the comment to the bottom of the comments list. How to i return a comment thats is in the comment template and add it to the bottom of the page. I have gotten as far as rendering some text back to the form and the comment doesn''t display until i refresh. This is my _newcomment.rhtml form to create a new comment <div
2006 Feb 07
2
render collection undefined local variable
Why am I getting undefined local variable ''contact'' in my partial. This is code I used to render the partial, works in lots of other places <%= render (:partial => ''list'', :collection => @contacts) %> in my parital I have <%= contact.first_name %> if I write this way it works fine <% for contact in @contacts %> <%= render (:partial
2006 Feb 21
1
formhelper methods don''t work with render collection partials
I''m rendering a partial using a collection: <%=render(:partial=> ''record'', :collection => @records)%> Inside the partial, I''m attempting to create a new form for each row, generating elements like the following example: <%= text_field "record", "name" %> However, though my objects are fully populated, these form tags
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 Apr 11
5
RJS adds comment but doesn''t update form
Hi, When a user adds a comment i want to add the comment to the end of the comments list using ajax so there is no full page refresh. The code i have below adds the comment to the database but doesn''t update the comments div with the new comment. Can anyone help? This is my first use of rjs templates and i have read http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
2006 Mar 21
2
Can you render partial with collection non-existent rows?
Hi, I''m trying to create a blank input form with a header and many item lines. I would like to build the item lines dynamically ie not hard code up to 100 lines into my form. Is it possible to use render partial with a dummy collection for this? When I try to render with @item_lines holding 1 object created with .new, I get: ActionView::TemplateError (undefined method
2006 Apr 30
4
renamed partial won''t render?
hi all this works <%= render :partial => "admin/works/work", :collection => @artist.works %> but this doesn''t <%= render :partial => "admin/works/worklist", :collection => @artist.works %> even though the partial _work.rhtml and _worklist.rhtml are identical. worklist.rhtml throws undefined local variable or method
2006 May 02
1
Newbie problem with Ajax and render partial
Hi all, I''m having this problem that I''m sure will take most of you all but two seconds to solve, but I''m very much a newbie. I read the documentation, googled for an answer, to no avail. I have simple page that lists items, each item as a row in a table. Each item has a rating and a link to increment/decrement rating. When using +/- on a rating on the first item,
2006 Jul 24
0
Why doesn''t default_url_options :anchor => ... work for render
In my action, I test to see if a particular button was clicked, if it was, I want the template to render, but to go to a particular anchor, like #company. E.g. if params[''add_company''] default_url_options :anchor => ''insurance'' end #... logic # then default render In the add.rhtml: <a name="company"> <%= text_field model, company_name
2006 Mar 13
0
(Nested) collection in a view
Say I have a model consisting of Order( has_many :order_lines) and OrderLine( belongs_to :order). What would be the ''rails way'' to create an order form? Know I could just say @order = Order.some_order, @lines = @order.order_lines, and use something like this..: order.rhtml: Order no: <%= @order.no %> Date <%= date_select "order", "date" %>
2006 Feb 27
0
when partial render is wider than the main part, scroll doesn''t appear on the browser!!!
Hi, in my rhtml, I have two parts, the main part and a partial, the main part has a width almost the same, but the partial is much longer and width. when it happens. the vertical scroll appear correctly on the browser, but the horizontal scroll doesn''t appear on the browser, it appears instead on the partial render part, so I have to scoll down until the end of the partial, that use the
2006 Jun 20
0
No opening form tag in rendered HTML
I cannot get my form to submit for my simple blog site (based on the "How to Build a Blog Engine in 15 Minutes" presentation) Any ideas? Thanks, Tom ---------------------------------------------------------------------------- Here is my code: #Post controller class PostsController < ApplicationController def index list render :action => ''list'' end
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
Hi all, Please excuse the long post, but I wanted to make sure you have all the information.... I have a NewsModel that looks like this: class News < ActiveRecord::Base belongs_to :user validates_associated :user validates_length_of :title, :description, :minimum => 5, :allow_nil => false acts_as_commentable acts_as_taggable def self.find_recent News.find(:all,
2006 Feb 05
2
render partial, object.property missing
trying to do my first rails app (surprise, it''s a blog!) anyhow. in list.rhtml, i have this: <% for post in @posts render(:partial => "post", :object=>post) end %> and in _post.rhtml, i have: <tr> <td><%= post.title%> <br /> <%= post.body%> <br /> problem is, no content shows up -- displays a
2006 Nov 16
2
T.38 - make conclusion
This is one long letter about T.38 and Asterisk. I hope it will help me, and lots of other Asterisk users to understand some T.38 problems with Asterisk. This is my situation: I have Panasonic DX600 FAX machine. It's connected to Asterisk 1.2.13 thru ATA adapter (I have used both, Cisco 186 and Grandstream HandyTone 386). Asterisk is connected with my SIP provider. That link that my provider
2008 Nov 09
10
T-Online Internet-Telefon (impossible to run the application
hey guys! after the installation of the "T-Online Internet-Telefon" (http://service.t-online.de/c/12/70/42/54/12704254.html) finally worked (thanks for improving wine!) it is now unfortunately impossible to run the application. the terminal gives the following output: Code: whizer at whizer-laptop:~$ wine "/home/whizer/.wine/dosdevices/c:/Program