similar to: Partial Naming Madness

Displaying 20 results from an estimated 1000 matches similar to: "Partial Naming Madness"

2006 Oct 19
1
Question about variable assignments/scoping after render call
I''ve got a question about how variables are made available to templates. We have a test that looks something like this: def test_variable_assigned xhr :get, :do_stuff, :id => 1 assert_not_nil assigns(:thing) end And our app code looks like this: class SuperClass < ActionController def do_stuff @parent_model = ParentModel.find(params[:id]) render :template
2007 Jul 19
7
NoMethodError in partial driving me mad
Hello, i simplified have a news model, a news category model and a news controller. my _news.rhtml partial renders a single news entry. in my controller there are the actions show and show_category. if the "show" action is called, a single news item is rendered through my partial with no errors. if the "show_category" action is called, i get a NoMethodError while displaying
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with an additional javascript directive? eg I''d like for an inline javascript to make the form''s div container hidden as soon as the button is pressed to avoid having it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div
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
2017 Jun 15
2
Function Inlining and undef / poison question
On 15 June 2017 at 23:12, John Regehr via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Hi Peter, I don't see what you're driving at here. You can perhaps move > the discussion forward with a complete, compilable example. > > John I don't KNOW for sure, but I think I understand, see below: > > > > On 6/15/17 11:27 AM, Peter Lawrence via llvm-dev
2005 Jun 29
2
Complex helper with block help
Hi everyone, I am writing a helper function that takes a parameter and block and wraps some HTML around it. e.g. def box_with_caption(caption, &block) data = capture(&block) buffer = render_partial("helpers/box_caption", :caption => caption) buffer << render_partial("helpers/box_data", :data => data) buffer end however, when I attempt the following,
2007 Nov 03
1
Specs for Helpers that call render
The helper spec I am writing tests a helper method that calls render. ## module HelperHelper def render_partial render :partial => ''partial'' end end ## The helper spec. ## describe HelperHelper do it "should render partial" do render_partial.should_not == nil end end ## The output generated ## $ spec spec/helpers/home_helper_spec.rb .F 1)
2005 Apr 13
2
render_partial & RXML
Does render_partial work within a RXML file? I am attempting the following: xml.users do for user in @users render_partial ''user'', user end end All that is output is: <user> </user> Without any exception or anything to indicate that I''m doing something wrong. Does anyone have any experiece with this? Josh
2008 Jul 17
2
[LLVMdev] Casting between address spaces and address space semantics
Hi all, I'm currently struggling a bit with some problems regarding address spaces and (implicit) casts. I'll explain some context first and then proceed to the actual question I'd like to have answered. In our target platform, we have a number of distinctly different memory banks. To access these from our C code, we declare a global array for each memory, with the address space
2008 Jun 05
4
[LLVMdev] Adding DenseMap::FindAndConstruct with a default value
Hi All, I've been fiddling around with a DenseMap to store cached copies of some result. In short, I'm doing the following: It = Map.find(Key) if (It != Map.end() && It->second != Unknown) Return It->second; // do_stuff return Map[Key] = Result; However, I this requires two lookups in the hash table, which is not so nice. Currently, there is no way to write this down so
2006 Jun 08
1
No rhtml, rxml, or delegate template found
hi , i''m having a problem with rendering a partial , the partial is in the apps/view/polls folder with the name : _antwoorden_user.rhtml in the view i''m rendering it with <% if @user %> <%= render :partial => ''polls/antwoorden_user'', :locals => {:poll => @poll, :user => @user} %> <% else %> .... gives me the error => No
2006 Jul 16
3
RJS problem
I have an odd problem while trying to use a simple rjs. _test.rjs : page.alert "test" test.rhtml: <script><%=render_partial(''test'')%></script> When I am attempting to view controller/test the page comes as if it was a text file. So i am actually seeing: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2008 Jun 04
2
Handling exceptions
Is there a convention for handling exceptions within BackgrounDRb workers? For example, I have a worker which does some asynchronous data processing (*not* a scheduled worker) based on some things in the database. However, if an exception is raised within that worker, then the process for that worker is killed off. Ideally I would want that worker to just silently fail and be optimistic that it
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">
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 Nov 17
7
render :partial in mail template
Hi, Is it possible to render a partial template from within a mail template? I get the following error undefined method `controller_path'' for SupportMailer:Class Extracted source (around line #8): 5: 6: <%= @url %> 7: 8: <%= render_partial ''sig_admin'' %> Jeroen
2006 Mar 01
2
Method Calling Problems
Hi all! I am attemping to call a method inside of my LeviUserController named show_userland from my LeviInterfaceController class. No matter how I do it, I keep getting some type of error. If I make the method a class method, then my render_partial inside of show_userland can''t be found. If i call it using @luser = LeviUserController.new; @luser.show_userland; I get an error with a nil
2006 Mar 05
1
Help with Self-Referential HABTM
With the help of the Rails Recipes have got a self-referential HABTM relationship working, but I''m really struggling with getting a new entry from a form accepted. i should say here that the form is also submitting info for the join table too. So in my model I have: class Type < ActiveRecord::Base has_and_belongs_to_many :subtypes, :class_name => ''Type'',
2006 Feb 14
22
Teaching Models to Render Themselves in the Controller
I am trying to teach my models how to render themselves, i.e. <%= my_model_object.render() %> Let me explain my reasoning and proposed method before this gets shot down as anti-MVC. Let''s say I am writing a contact-management application. I have a class Contact. I will need to display this class all over the application. My first choice is to use a partial. Now I can
2006 Dec 13
4
RSpec and simply_helpful
Hi All I''m having some problems running my view specs when using simply_helpful. I have it semi-working via the following: module SimplyHelpfulHelper def self.included(base) base.send :include, SimplyHelpful::RecordIdentificationHelper base.send :include, SimplyHelpful::RecordTagHelper end end context "The index template" do setup do @shift =