Displaying 20 results from an estimated 400 matches similar to: "What is the matter with content_for_layout?"
2007 Jan 23
3
Too many session numbers per page request?
If I view the source on one of my pages I see:
<script src="/javascripts/prototype.js?1168898271"
type="text/javascript"></script>
<script src="/javascripts/effects.js?1169242655"
type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1169241657"
type="text/javascript"></script>
2006 Mar 12
11
HABTM selection conditions
Hi,
I am currently trying to learn RoR and there is something I cannot
figure out.
I have two models: Article and Category, that are HABTM-linked.
Everything works fine if I want to select all articles corresponding to
a category, with something like
@articles = @category.find(@params[:id]).articles
However, I have a ''published'' field in my ''articles''
2006 Mar 13
4
Find and eager loading questions
Hi all,
I want to see if I''m not missing something with associations and eager
loading. (I''m currently using Locomotive on OS X and SQLite3.)
I have two simple tables/models, set up properly: teams has_many
:matches and matches belongs_to :teams. Matches has a match number and
a team_id field (along with several other fields) and teams has a
team_number field (again, along with
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 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 Apr 30
3
require "ajax_scaffold" in model error
Hi there,
I''ve got installed ajax_scaffold_generator (3.1.2, 2.2.1)
Anyway I''m following the example here <http://height1percent.com/
articles/2006/04/18/ajaxscaffold-3-1-0-released> which suggests the
following in a model file:
--------------------------------------------------------
require ''ajax_scaffold''
class Pet < ActiveRecord::Base
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 Aug 02
2
Ajax_Scaffold display from link table
Hi,
Ive followed the pets/people ajax_scaffold example without any problem.
I have a table documents and each document has a category. In the
documents table i have a field called category_id. So in the documents
grif i want to display the corresponding catgory name and when it comes
to adding a new category or editing the have a drop down list to select
from.
category.rb
require
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.
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 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 =>
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 Mar 07
12
what is the IDE tools used in the video?
What is the IDE tools used in the video on the homepage of the
www.rubyonrails.org?I had thought it was Komodo,however after I had
installed that i found they were different.I do think the IDE used in
the video is very cool for its autocomplete abilities especially in the
Views development.Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Jul 10
0
ajax scaffold problem
Hi,
I am using ajax_scaffold to generate against a model backed by atable on SQLServer...
It creates all the stuff, and I can list the items in my table... But, the "Edit" and "Create New" buttons dont work...
The strange thing is that the problem occurs when I edit the ajax_scaffold generated controller with before_filter/set_charset...
I try to set the charset of pages
2008 Jan 06
8
n00b question/issue
i know this is n00b but i have searched and i can not figure it out.
i am running instantrails on windows. i downloaded ajax_scaffold and
installed using script/generate in a new rails project. after
configing the db i can the following error when trying to access
http://localhost:3001/invoices/list (invoices is the controller/table
i built ajax_scaffold on)...
NameError in
2005 Dec 19
1
help on barplots
Hello, I am a beginner with R and I would need some help with doing barplots.
My problem is that I would like to include both diffrent colors of the bars
and precence/absence of shading lines in the barplots. When reading in the
help file about the "col" command it states:
col: a vector of colors for the bars or bar components. By
default, grey is used if 'height'
2006 Mar 12
5
Authentication and authorization of static content
Hello,
I''m a Java programmer looking to make my life easier. Thus, I''m
considering using Rails for my next project. I''ve read chunks of the
Agile book and it looks like authorizing users at the Controller level
is dead easy to do. However, I have a need to password protect static
content in my site. In the J2EE world, I would use a servlet filter to
intercept
2006 Mar 25
1
Question about upgrading to rails rc1.1
My current under-developed project is using rails 1.0 and now plan to
upgrade to rails rc1.1,the project uses the Rails-engine and
Login-engine as the login module,when I update the rails according to
http://weblog.rubyonrails.org/articles/2006/03/22/rails-1-1-release-candidate-1-available
The project still can not be started,anybody can tell me the reason?very
thanksful!And following is the
2006 Oct 17
1
Routing Problem
Hi,
I have a folder structure see below which basically has a fodler for the
main pages of the site(main) and another folder which contains a
ajax_scaffold grid to allow a user to view/sort/download documents:
views
main
documents
Controllers
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Apr 17
5
Strange question on file_column
I have met a very strange problem on file_column usage.
After I have added
file_column :image
to the model,everything is ok.
But after I added more:
file_column :image, :magick => {:versions => {
:thumb => {:size => "50*50"},
:medium => {:size => "640*480>"}}}
I can not even start the whole website! Here is the