Displaying 20 results from an estimated 1300 matches similar to: "Layout Question .. (Sitemesh related)"
2006 Jun 19
1
script.aculo.us support script loading fails with SiteMesh in FireFox
Hi everyone,
I''m new to Script.aculo.us. I''ve searched the archives but haven''t
found any info on this so thought I would ask.
I have a web app that uses SiteMesh from OpenSymphony. Basically, it''s
an outbound page decorator that applies common elements to pages as they
head back to the client. I''d like to used the slider control, so
2006 Jan 17
9
Setting layout template in .rhtml
I''ve a single controller -
class ContentController < ApplicationController end
in the app/views/content folder I have quite a few .rhtml files
I need to be able to choose a different layout template to
use in each of these .rhtml files.
i''d like to be able to do something like (which doesn''t work..)
<% layout ''layout1'' %>
Any
2006 Jan 03
22
Large-scale application
Hi fellow railers!
We are discussing the possibility of writing a very large application in
Rails. By "very large" I mean a framework that would contain a few
hundred smaller applications that would need to talk to one big database
and have to share some common session data I''d like to get some
feedback on some possible ways of doing the following:
The application would
2007 Jan 25
4
How to change the menu depending on the controller/method?
Hello,
I''m still dtarting with ruby on rails. And I''m trying to have a menu
depending on the current controller/method.
Here is what I was thinking of (please tell me if there''s a better way
to do it):
I have a database with menu_groups (corresponding to controllers) and
menu_elements(corresponding to methods). Each menu_element belongs to
one menu_group.
I created a
2006 Jan 12
5
Question about using DISTINCT in ActiveRecord find method.
Hi,
Am relatively new to the RoR world. My question is quite simple.
I have a query like such:
shipmentNumbers = Order.find_by_sql(["select distinct s.id from orders
o, line_items li, shipment_lines sl, shipments s where o.number=? and
o.id = li.order_id and li.id = sl.line_item_id and sl.shipment_id =
s.id", number])
The above query works fine. I wanted to do the same query using
2006 Sep 05
4
No matches
The following script creates a search index and then searches it. I get
no results? Where am I going wrong?
Thanks.
-----------BEGIN SCRIPT----------------
require ''rubygems''
require ''ferret''
include Ferret
path = ''/tmp/myindex''
field_infos = Ferret::Index::FieldInfos.new()
field_infos.add_field(:name, :store => :yes, :index => :yes)
2006 Jul 13
6
Content_for_layout
Question- if I have more then one view I wish to display in a layout , how
do I tell content_for_layout what to display and where ?
TIA
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/a2d0a8c8/attachment.html
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout
test_controller
def list
layout "stdlayout"
end
in the views/test/layouts stdlayout.rhtml
<html>
<head><title>test</title></head>
</body>
<h1>Test</h1>
<%= content_for_layout %>
</body>
</html>
2) I get Rails Application Error when trying to use a separate
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/.
2006 Feb 15
5
Formating @content_for_layout
Hi all, I sent a message earlier, so forgive me if you have already
read this (I got some cryptic message in German about how my
e-mail was not read?). Anyway, I was just wondering if there was
any way to format the html that is output using
<%= @content_for_layout %>
I want to use something like the PHP Beautify. I guess I could
write my own, but I was hoping that Rails already had
2006 Jan 18
7
FastCgi issue
Hi,
I know that Apache2 + fastcgi is sometimes difficult to setup, but I was
wondering if anyone has come across this error and if yes what did you
do to resolve it?
[Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115] FastCGI: comm
with server "/var/htdocs/ot/public/dispatch.fcgi" aborted: idle timeout
(120 sec)
[Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115]
2006 Jan 31
4
RoR production app does not refresh
Hi,
We have a RoR app deployed using Apache + fastcgi in production mode.
When we make a change to say a controller filie on the server and go
back to that page that executes that controller action it takes no
effect. Does Rails cache pages and if so how does one force the new page
to be used?
Thanks,
2006 Jan 23
8
yield vs @content_for_layout, etc..
I am relatively new to RoR and Ruby for that matter. A few questions
for the pros:
Question 1:
In the 5min ajax video the presenter uses
<%= yield %> in his layout.
In the agile book, @content_for_layout is used.
Since, yield is an actual Ruby construct, is it more efficient and
preferred? What is the difference?
Question 2:
Links are often of the form :action =>
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item
to fade and then get removed. So I do the following:
1. home_controller:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
2. delete.rjs:
if @element_id
page.visual_effect :fade, @element_id
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 Jan 24
3
Is there a concise way?
Hi,
Is there a concise/ruby way to do the following:
[Note: 1 and 2 below are not related.]
(1)
for p in 0...@order.line_items[k].shipment_lines.length
shipline_qty = shipline_qty +
@order.line_items[k].shipment_lines[p].quantity
end
(2)
ts = Array.new
for tk in s.trackings
ts.push(tk)
end
2006 May 23
11
adding layouts within layouts
Hi,
I want to be able to have several layouts within each other so that I don''t
have to keep repeating the layout code for one, in another. An example
would be having a layout for the title of your web page and then having an
embedded layout for the body portion in which the HTML for whatever view
gets displayed. Is this possible?
Thanks.
-------------- next part --------------
An
2006 Apr 27
3
XML output
Hi,
Sorry abt the half finished post that I sent out earlier.
The idea is to generate an output xml response as such:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<response status=''NOT_AVAILABLE''>
<message>Some text</message>
<from>Me</from>
</response>
I make a request like such
2006 May 01
3
RMagick question ?
I have a file rmg.rb:
require ''RMagick''
include Magick
cat = ImageList.new("prod.jpg")
cat.display
exit
The file prod.jpg is in the same directory as this file above.
I execute the following:
ruby rmg.rb
I get the following output:
/usr/lib/ruby/1.8/RMagick.rb:1377:in `read'': unable to open image `'': No
such file or directory:
2006 Mar 13
5
What is the matter with content_for_layout?
Here is my layout file:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>My Demands</title>
<%= stylesheet_link_tag ''ajax_scaffold'', :media => ''all'' %>
<%=