Displaying 20 results from an estimated 20000 matches similar to: "Can variables in the template be used in the layout?"
2006 Dec 17
1
Markaby template & layout (can't get them to work together)
Hi all,
I am starting a new rails app with the Markaby plugin (had some issues
installing, but think its working).
First, i created an index.mab file for a controller containing:
h1 "First template"
That rendered fine. Also, I do not have a "def index ..." in the
controller.
Then I created an app/layouts/application.mab file. It didn''t get picked
up until after
2006 Mar 31
3
Layout Question .. (Sitemesh related)
Hi,
I understand that the layout concept is very similar to OpenSymphony''s
Sitemesh project. I have done a lot of development with Sitemesh, but am
fairly new to Rails. I am wondering if there is a way for a layout in
rails to find out value of a variable from a page it is decorating?
In sitemesh you would be able to do <meta name="show_menu"
content="true"> on
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 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
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 Jun 27
6
embedding ruby code in a [flash :notice]
The ruby code in this isn''t evaluated...
flash[:notice] = "Your last recorded entry was <%= @in_out.time_in %>
<br />You are currently marked as ''In'', you probably want to check
''Out''"
Is there a way?
Craig
2006 Mar 17
2
How to let the layout be more OO?
I am confused about the @content_for_layout.''cause it will display all
the views in the layout.Do I have any methods to let the layout be more
OO? I mean that for example,the app currently have more than one views
to be displayed,but only some of them to be displayed at the same time
at different <div></div> units. I hope there exists a kind of way that:
<%= if
2006 Aug 15
6
Net::LDAP 0.0.4 released
Announcing version 0.0.4 of Net::LDAP, the pure-Ruby LDAP library.
Thanks to the many people who have used this library and sent in
comments,
suggestions, feature requests, and patches. An even bigger thank-you to
the
folks who have made themselves available to help with testing.
Net::LDAP has been quite stable for several months now, so we bumped
the development status of the library up to
2006 Apr 10
6
Object isn''t being saved when called through association
I have three models in this small game I''m working on - the Game,
Players, and Turns. A Player should be able to rescue another Player
on any given turn. So it looks like this:
class Game
has_many :players
has_many :turns
def rescue_player(p)
t = turns.last
t.rescued = p
t.save
end
end
class Turn
belongs_to :rescued, :foreign_key =>
2005 Oct 16
13
More than one parameter with link_to_remote
Hi all,
I''m trying to pass more than one parameters using link_to_remote, but I''m
getting a behaviour that seems quite strange to me. Here''s the code:
link_to_remote ''some text'',
:update => ''form'',
:method => ''get'',
:url => { :action =>
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 Sep 18
3
(slightly O/T) Agile dev. contract form for clients?
Apologies for cross-posting.
We''ve been asked to do a job for a client who wants to embrace agile
development methodologies. Hurrah!
However, our standard contract was written for the 1980s. It is full
of phrases like "agreed specification" and "change request procedure"
and so on.
I was wondering, how do other people get around this in contract
forms with
2006 Jul 27
16
Net::LDAP 0.0.3 released, adds TLS encryption
We''re pleased to announce version 0.0.3 of Net::LDAP, the first
pure-Ruby LDAP library. Net::LDAP intends to be a feature-complete
LDAP client which can access as much as possible of the functionality
of the most-used LDAP server implementations. This library does
not wrap any existing native-code LDAP libraries, creates no
Ruby extensions, and has no dependencies external to Ruby.
2006 Mar 30
13
need an Ruby on Rails IDE
Hello everybody,
I''m a new member on Ruby on Rails.
I''m friendly on using Microsoft Visual Studio (VS) IDE.
The VS IDE supports for Intellisense coding (that mean it will
automatically display a list of member variables or functions for a
class, struct, union, or namespace; the names and types of parameters
required by a function or attribute; and the complete declaration for
2006 Jan 07
11
Beware of Mozilla + Rails
Hi all,
In re-doing the very first Hello World in the Agile Rails WEb Dev book, I
continuously got blank pages, no matter what URL I put in, except when I put
http://localhost:3000/
After eliminating everything else, I switched from Mozilla to Konqueror, and
the symptom went away. I tried clearing cache on Mozilla, but that didn''t
bring it back. I copied and pasted the URL from
2006 Aug 11
9
Getting Really Started with Rails - Tutorial styled Slides Available
For those that missed out joining the amazing turnout of ~70 people here in
Vancouver for the mini-workshop I did on the 27th last month, I am making
available the 30 slides I used for the presentation.
The slides were used in conjunction with me demonstrating it via command
line. Alot was learned by both attendees, and quite possibly even more so by
myself while teaching the material.
I created
2005 Mar 04
17
active record logs format
Hi,
I think this has already been asked on the list, but I can''t seem to
be able to find it again:
currently, active record does some weird thing with its sql logs i.e.:
[4;33mSQL (0.000000) [1;37mPRAGMA table_info(map_locations)
how do I remove the "[4;35m"
thx
Jean
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 Jan 01
11
Can rails make use of accesskeys?
I added :accesskey=>"D" to the html options hash of my link_to tag
but nothing happened.
Should I keep trying or is this not an option yet?
bruce
2006 Oct 16
4
Singleton Pattern in RoR
Hi all
how can I implement the singleton patter in RoR?
thanks
--
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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this