similar to: partial problem from down under.

Displaying 20 results from an estimated 100000 matches similar to: "partial problem from down under."

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><%=
2005 Dec 27
1
Odd Behavior with render
I''d been trying to iterate through an array of hashes using the ActionController''s render method. Unfortunately, it appears that when I use a hash as one of the array elements, it gets passed as a nil to the partial. Here''s some code: @books = [ ''hello'', ''hello2'' ] render :partial => "book",
2005 Nov 14
0
in_place_editor_field inside a partial collection
(I''ve already posted this to a quite unrelated thread. Sorry for those reading this twice.) Did anybody succeeded in using "in_place_editor_field" inside a partial collection? It''s working perfectly in a regular template, but the id part becomes blank when it''s inside a partial collection. article_controller.rb: class ArticleController <
2011 Mar 01
6
render :collection calling partial with phantom object?
I have two models with a straightforward has_many / belongs_to relationship: class Premise < ActiveRecord::Base has_many :metered_services, :dependent => :destroy ... end class MeteredService < ActiveRecord::Base belongs_to :premise ... end and nested routes to match: Demo::Application.routes.draw do devise_for :users resources :premises do resources :metered_services
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
2014 Jan 21
1
RFC 5267 Contexts for IMAP4 PARTIAL results
Hello, I am looking at PARTIAL responses using a dovecot version 2.2.5 and am running into an inconsistency with the RFC which I would like to ask about. The following section http://tools.ietf.org/html/rfc5267#section-4.4 lists client requests and server responses which I have tried running against a folder, specifying the ranges that fit the contents of the folder I have selected.
2008 Sep 15
1
url_for_file_column within if within a partial
I have a partial that has the following code: <% if product.prd_big_image.nil? %> <img alt="Image" src="/images/empty.jpg"> <% else %> <%= image_tag url_for_file_column(:product, :prd_big_image, "normal") %> <% end %> and get the following error You have a nil object when you didn''t expect it! The error occurred while
2006 May 16
0
strange partial error
I''m getting this weird partial problem. I''m calling the partial like so: <%= render :partial => partial, :locals => {:message => message, :display => display, :indent => indent, :button_type => button, :terms => params[:search_terms]} %> The object in message can be printed out first, and then within the partial I can access it, and it returns false
2008 May 08
0
stub sub partials when testing partial with rspec
Hello all I prefer to use many partials. It makes my code more DRY Also I use rspec, and when I have to test partial with sub partials I have a problem. if I stub render, then my partial will not be rendered. If i do not stub render it tries to render sub partial (and i don''t need this) Not very long googling did not bring the answer, so I made very dirty and IMHO dangerous function
2005 Dec 18
3
undefined local variable in partial
i can''t get rid of the following error: ActionView::TemplateError (undefined local variable or method `order_line'' for #<#<Class:0xb75b2090>:0xb75b1f28>) on line #13 of app/views/admin/_order_line.rhtml: 10: 11: <tr valign="top"> 12: <td> 13: <div class="olnamebox"><%= h(order_line.name) %></div> 14:
2007 Mar 19
5
app has problems parsing its config file
Hello, I want to make wine run a qt-based commercial, large windows app. I run wine 0.9.22 on gentoo amd64 and can successfully run other applications. The app in question starts up fine, asks for which modules to use and then proceeds to constructs a temporary config file for itself. However, it then proceeds with an error message by itself that it encountered a problem parsing this config file
2014 Feb 18
0
PARTIAL results and UIDs
Hi, I have had a look at dovecot 2.2.12 and think that I may have run into an issue with PARTIAL results. I have a mailbox with 9 emails having UIDs from 1 - 9. One of these emails contains the STRING "RFC" in the Subject header. The following SORT command with this mailbox selected does not return any emails: A4 UID SORT RETURN (COUNT PARTIAL 1:3) (FROM) UTF-8 (SUBJECT
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
2010 Sep 27
9
Rails 3 - Creating a comment and then returning the Partial with JUST the new comment
Here''s the flow I have... First, jquery posts the new comment to the server: $.post(this.action,$(this).serialize(),null,''script''); Then in the comments controller: def create @comment = lots of stuff going on here but it works... if @comment.save flash[:notice] = "Successfully created comment."
2010 Jan 19
0
best way to set default for an optional local in a partial?
What''s the best way to set the default value of an optional local variable in a partial template? In the past I''ve used <% foo = default_value unless (defined? foo) %> But http://api.rubyonrails.org/classes/ActionView/Base.html says *not* to use (defined? foo) and instead use (local_assigns.has_key? :foo) thus <% foo = default_value unless (local_assigns.has_key?
2006 Apr 03
8
Layout problem
Hi, I am creating a blog to learn ruby on rails. The blog.rhtml in the layout folder has a the following code <td width=150 valign="top">This is the left menu</td> <td width=600 valign="top"><%= @content_for_layout %></td> <td width=150 valign ="top"><%= render :partial => "categorylist", :collection =>
2006 Mar 03
5
avoiding nil object error?
I''m a total Rails newbie and i''ve been struggling for hours today with one (prolly very silly) problem: I have a table portfolios that has many images: class Portfolio < ActiveRecord::Base has_many :images end class Image < ActiveRecord::Base belongs_to :portfolios end In the controller i define a list of active portfolios: @active_portfolios =
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
By default, Mongrel will delete the HTTP request body and short circuit calling any handlers if a request is interrupted or incomplete. Unfortunately, this breaks any attempt to correctly handle a partial PUT. (BTW, PUT is *way* more efficient for uploads compared to POST which requires a MIME parsing step.) So, about a month ago I wrote up some patches to Mongrel 0.3.18 that allowed
2008 Mar 21
0
Info: _flash.html.erb partial a bad idea
I guess a partial creates a variable by the same name. I wrote a simple partial called _flash.html.erb in which I display the flash errors and warnings. But, inside that partial, flash was defined but set to nil. Renaming the partial to _display_flash.html.erb resolved the issue. HTH pedz -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
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