Displaying 20 results from an estimated 1000 matches similar to: "yield vs @content_for_layout, etc.."
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
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 Jul 19
4
Using Application.rhtml as layout for all controllers
I put my nav system in application layout. that way any controller
loading will have the nav system. I have one problem though - the <%=
yield %> is in the body, so how would my controllers specify other css
files?
my application layout would look like this:
<html>
<head>
title
css include
javascript include
</head>
<body>
nav system
<%=yield%>
2006 Jul 27
3
Multiple @content_for_layout in template?
Hi guys,
I''m having a few experiments making sites with Rails and I''ve come
across a problem. I''ve made a template for the parts of the site that
the public will see and it has two main columns in it, a main content
column and a thin side column. The content in each of these will change
on each page of the site but I''m not exactly sure about how to send
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'' %>
<%=
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/.
2007 Sep 01
2
@content_for_layout or changing default fields on "new" page
Hi all,
I test my small Rails apps using SQLite3, but I think the problem
appeares in every type of database.
.
When I create table and scaffolding apps, a HTML view is based on
columns types. Everything is OK until I want to change preconfigured
behaviour.
.
I created table with a column of type INTEGER, but I wanted to display
check box instead of text field and then save 0 or 1 in database.
2006 Jan 15
7
Include extra partial in layouts
Hi all,
Does anybody know how to include a partial (next to @content_for_layout) in a
layout file?
I''m looking for a something like @partial_for_include => ''filename'' in my
layout files. So a linked .rhtml file gets picked up from within a layout
file. All my layout files (4 at the moment) have a <div class="navright">
tag, so one change in the
2006 Jul 25
6
DRY question (newbie)
Say i want to include the same chunck of text (a menu on a webpage for
example) on each page. Is there a method by which I can save the HTML in
a text file and call it up later? Is there a better way?
I know ruby has "puts" but i can''t use that b/c it does not work with my
webhost (dreamhost.com)
Any suggestions?
--
Posted via http://www.ruby-forum.com/.
2006 May 29
0
@content_for_layout transition effects
I was guessing if its possible to make transitions effects for the code
that are included inside @content_for_layout(ex: new, list, edit) like a
fade out and fade in, right now im using the accordion effect of moo.fx
but the content its to much inside and sometimes takes a while to load
and show the effect properly.
Any example or advice its more than welcome, ill keep searching about
this.
2009 Sep 01
13
Function Testing Reloading Fixtures before assertion
Hey Everyone,
I have a function test the is failing (despite the fact the function
actually works in the application). I was looking for some debug
advice on how to find my problem.
Here is the test:
def test_should_delete_word
assert_equal ''published'', words(:one).status
debugger
delete :destroy, :id => words(:one).to_param
assert_equal
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 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id''
I have a Model class like the following:
class Article < ActiveRecord::Base
set_primary_key "ARTICLE_ID"
end
however, using a link_to like the following (modified scaffolding),
the link has no id value:
<% for article in @articles %>
<tr>
<% for column in
2013 Apr 12
1
What is the meaning of the method to_param?
Hey!
Foe example i have next code:
test "should update user" do
put :update, id: @user.to_param, user: @input_attributes
assert_redirected_to users_path
end
What return id: @user.to_param?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group
2007 Jan 24
2
A spec where interaction-based testing breaks down... (at least for now)
Here are the specs:
context "Finding all the stylesheets available to a company" do
setup do
@mock_company = mock("company")
@mock_company.stub!(:to_param).and_return "1"
Stylesheet.stub!(:find)
end
def do_find
Stylesheet.find_available_to @mock_company
end
specify "should convert the company into a parameter" do
2024 Oct 08
2
rpcclient setdriver fails with WERR_ACCESS_DENIED
Hi Rowland,
Thanks very much for your quick response.
> Have you tried the command with a member of Domain Admins instead of
> Administrator ?
I just did and I now feel that something is wrong with
our Administrator-account.
Granting the SePrintOperatorPrivilege to user NAV\prtadmin with user
NAV\Administator failes on our fileserver (INVALID PASSWORD).
Granting the
2023 Aug 31
1
Need help with idmap-configuration
Hi,
I'm migrating a samba3-server that is used both
as a NT4-DC and a filesver into a pair of samba4
servers, one should become the new AD-DC and the
other one should be the new fileserver.
The new AD-DC seems to work fine. I created all
local unix users and unix groups on the new AD-DC
before I started the classic upgrade and deleted
all of them after the update was finished. That
way the
2007 Jan 30
5
errors while testing resource controller using rpec
I am testing a resource called venue in this piece of code (generated
using script/rspec_resource)
====================
context "Requesting /venues using POST" do
controller_name :venues
setup do
@mock_venue = mock(''Venue'')
@mock_venue.stub!(:save).and_return(true)
@mock_venue.stub!(:to_param).and_return(1)
Venue.stub!(:new).and_return(@mock_venue)
2024 Oct 08
1
rpcclient setdriver fails with WERR_ACCESS_DENIED
On Mon, 7 Oct 2024 22:46:36 +0200
Peter Koch via samba <samba at lists.samba.org> wrote:
> Dear Samba-experts,
>
> I'm trying to setup automatic printer download with our
> samba 4.19.4 fileserver which is a domain member of
> our samba 4.18.2 AD.
>
> printer drivers have been installed on the fileserver:
>
> root at serv00:# rpcclient -Uprtadmin%pass1