similar to: partials with yield

Displaying 20 results from an estimated 30000 matches similar to: "partials with yield"

2006 Jan 10
0
find_by_sql + partials question
Ok now that I have find_by_sql love working for my "Top 10 List" I want to make them a bit more DRY. Tis is what I have so far: Model: def self.topfish find_by_sql["select species.name, length,species.multiplier*length as score,caught_on from entries join species on species_id = species.id where species_id = ? order by score DESC LIMIT 10", species]
2008 Mar 31
2
Rails and Partials
Excuse my ignorance on partials but..... I am trying to use partials to create a uniform display box built with html tables. The only way I have thought about accomplishing this is to create two partials: _start_box.erb ---------------- <table id="box" width="<%= width %>"><tr><th><%= h(label_text) %></th></tr><tr><td>
2009 Nov 10
0
Nelson- Siegel - (Yield Curve - Smoothening of curve)
I am Julia Cains from Brisbane. This is my first mail to this group and I have recently started learning the R language.   I am trying to learn the smoothening of the yield curve. However, I came across the CRAN package – “YieldCurve” meant for Modelling and estimation of the yield curve. The problem is I am not able to understand whether this package will help me to carry out smoothening of the
2007 Jul 24
2
reusing partials
Might be asking a daft question or missing something obvious here as I''m a bit of noob at this, I''ve got the code below in a partial and am using it to display and attach skills to degrees which is working fine, I now need to do exactly the same thing for interests and was wondering if there is any way to pass the partial a parameter which I can then some how be used to replace
2006 Jul 21
1
Partial, Table Layout, Multiple Controllers/Models... DRY?
Hi, I am almost embarrased to ask this and I am sure it has been answered previously but the search feature is down on ruby-forum so I am not finding the answer. I have several controllers (leads, orders, activities, etc...). I have a ton of repeated html in each of the views for these controllers. For example, my list view has the same table/tr/td and for..in type of code and it just
2006 Aug 09
3
[Markaby] yield instead of @content_for_layout?
We''re supposed to use yield instead of @content_for_layout, but I can''t get yield to work in a Markaby template: yield text yield Either one of these lines results in a ''no block given'' error (but ''text @content_for_layout'' works). Anybody know how to use yield instead? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
2004 Oct 26
0
[LLVMdev] Some question on LLVM design
On Mon, 25 Oct 2004, Marc Ordinas i Llopis wrote: > Misha Brukman wrote: > >>1. Opcodes and intrinsics > >> > > That's not really correct. The intrinsics such as llvm.frameaddress and > > llvm.returnaddress have no equivalents in LLVM opcodes -- the meaning of > > the intrinsics is specifically machine-dependent, and LLVM (and its > > opcodes) are
2006 Dec 12
2
RXML partial question
All, I have a RXML template which renders partial RXML templates within it. A snippet is below. The "xml" variable is the parent template''s Builder variable. It is passed into the partial under the name "parent_xml". Why can''t I use :locals => {.... :xml => xml ....} in my call to render the partial? It seems like if I do use :xml => xml, it
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,
2016 Oct 24
0
[PATCH 2/5] stop_machine: yield CPU during stop machine
On 10/22/2016 02:06 AM, Nicholas Piggin wrote: > On Fri, 21 Oct 2016 14:05:36 +0200 > Peter Zijlstra <peterz at infradead.org> wrote: > >> On Fri, Oct 21, 2016 at 01:58:55PM +0200, Christian Borntraeger wrote: >>> stop_machine can take a very long time if the hypervisor does >>> overcommitment for guest CPUs. When waiting for "the one", lets
2006 Dec 30
0
[811] trunk/wxsugar/lib/wx_sugar/layout.rb: Yield the sizer rather than the underlying parent to an ''arrange'' block
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2012 Sep 05
2
Partials and helpers
Hi, Is there any reason why helpers cannot render partials? I would like to do something like this in the layout: <body> <%= magic_header %> <%= yield %> </body> and then have a magic_header helper def magic_helper ...do some magic... render partial: "magic_helper" end Why is this wrong? Cumprimentos, Luís Ferreira -- You received this
2006 Apr 15
1
Right way to pass conditionals to partials
Hi All, I have some partials that need to be rendered a bit differently depending on the context. To make matters worse, sometimes these partials are including other partials, that I''d like to control from the main template. These partials are templates that look similar in different contexts, but have different controls depending on where they''re being rendered. I
2007 Aug 07
2
stubs which yield and return
Is there any reason why a stub couldn''t both yield and return? I''m looking for a way to mock out a class I''ve made named "AnonymousClass": class AnonymousClass def initialize(&blk) @klass = Class.new @klass.instance_eval(&blk) if block_given? end def new @klass.new end def evaluate(&blk)
2005 Dec 16
3
Purpose of ''yield'' in layout file in Flickr video?
During the excellent flickr video, the presenter adds the following to the applications layout file: <body> <%= yield %> </body> What is the purpose of the ''yield'' line? I would think there would be a content_for_layout tag there instead. Thanks, Don -- Posted via http://www.ruby-forum.com/.
2006 Jun 25
4
Zebra Striping a Collection of Partials
I''m using render to display a collection of partials, where each partial is a table row. Is it possible to zebra-stripe the table using this method i.e. alternate table rows get a different CSS class? I can''t work out how each row partial would know whether it was odd or even. In the normal scheme of things I could do: <% odd_or_even = 0 for asset in @assets
2007 Mar 23
0
[ wxruby-Bugs-9501 ] evt_spinctrl should yield an event of type SpinEvent
Bugs item #9501, was opened at 2007-03-23 16:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=9501&group_id=35 Category: Incorrect behavior Group: None Status: Open Resolution: None Priority: 3 Submitted By: Alex Fenton (brokentoy) Assigned to: Alex Fenton (brokentoy) Summary: evt_spinctrl should yield an event of type SpinEvent Initial Comment:
2010 Feb 06
1
Yield not working upgrading to rails 3
I am currently upgrading an app to rails3 and have run into a weird issue where my main content will not yield. I get nothing rendered to the page. If I use content_for I can get it to render fine but the main yield does not work. If I generate a new app things work as expected. Any suggestions on where to look? The log says it is rendering and I get zero errors... -- Posted via
2006 Aug 05
2
yield :layout, add extra content at controller level
Hi, Could someone point me in the right direction for specifying content at the controller level so that I could use something similar to "yield :left_nav_content" as well as "yield :layout" in my layouts? I know I can specifiy this content in my view using something like: <% content_for("left_nav_content") do %> <h1>Some Menu Options</h1>
2006 Mar 15
0
Grid making helper in view
Hello, I apologize if this has been asked before. I am interested in creating a helper for my view that generates a grid-style table. Here''s what I have in application_helper.rb: def print_grid_layout(items, table_class, num_columns) print %Q{<table class=''#{table_class}'' cellpadding=''0'' cellspacing=''0''>\n} rows =