similar to: How does layouts work?

Displaying 20 results from an estimated 4000 matches similar to: "How does layouts work?"

2006 Jun 13
5
Can RoR handle a lot of traffic?
And compared to PHP? -- Posted via http://www.ruby-forum.com/.
2006 May 24
5
Starting on the Ruby Rails path
Hi all, I''m a web designer/-developer. I found Ruby and Ruby on Rails, and as I can understand (for now) this is what I''ve been looking for. I''m really exited about this. Prior to this I''ve used Lasso and PHP. But a few questions (sitting on Mac OS 10.4.6). I tried to install according to this:
2006 Jun 07
10
RoR with Apache2 - performance?
How is the performance running RoR with Apache2 compared to running it with PHP? -- Posted via http://www.ruby-forum.com/.
2006 Aug 17
4
Migration newbie
In an migration file there is one up and one down method. Below is from Agile Web Development with Rails: class CreateOrderHistories < ActiveRecord::Migration def self.up create_table :order_histories do |t| t.column :order_id, :integer, :null => false t.column :created_at, :timestamp t.column :notes, :text end end def self.down drop_table :order_histories end end Why is there a drop
2006 Jun 14
13
A good tutorial
Are there any other tutorial than "Agile Web Development with Rails" that you can suggest? So far I can''t say that RoR has been easy to learn. :-) -- Posted via http://www.ruby-forum.com/.
2006 Jul 14
6
Don''t understand :: in ActionController::Base
Maybe this should apply to Ruby forums directly, but I''ll try here. I understand the concept of classes and subclasses thanks to the excellent "Programming Ruby - The Pragmatic Programmer''s Guide". However, I don''t understand what :: signify in terms of inheritance, parent and child in e.g. ActionController::Base -- Posted via http://www.ruby-forum.com/.
2006 Jun 07
16
How dows RoR work?
This is so frustrating. Is RoR that easy to learn or is it hype or is it just me? I wonder how many newbies like me are surfing the docs trying to get a clue of the basics. Every tutorial I find is much the same, and seems to skip the fundmental parts. How should you understand the Ruby API http://api.rubyonrails.org/? What is < ActionController::Base? Can''t I set a cookie under
2006 Jul 06
5
What is protected?
In http://www.aidanf.net/rails_user_authentication_tutorial there is the string/method protected in the model. What does it do? Can''t find that in http://api.rubyonrails.org/. -- Posted via http://www.ruby-forum.com/.
2006 Jun 07
4
Table names
Can I use the table name "adm_users" (mysql)? Will that give the model name "adm_user"? Or should it be "admusers" and "admuser"? -- Posted via http://www.ruby-forum.com/.
2006 Jul 07
1
Style on _fields
How can I modify the style of a RoR field like text_field or password_field? I can use input in css, but how do I add a class? -- Posted via http://www.ruby-forum.com/.
2006 Jun 07
1
What is class TestController < ActionController::Base
What are the different parts of; class TestController < ActionController::Base? I look at the http://api.rubyonrails.org/ and try to understand but I don''t. Could someone give me a hint? I get the part of Test being the "folder", def and all that, but I can''t find an explanation of the basic stuff. -- Posted via http://www.ruby-forum.com/.
2006 Jun 01
5
flash not clearing after display
(Rails 1.1, Ruby 1.8.4) In the layout for one of my controllers, I have a tag to display a flash message (copied from AWDWR), like this: <div id="data"> <% if @flash[:notice] -%> <div id="notice"><%= @flash[:notice] %></div> <% end -%> <%= @content_for_layout %> </div> If the
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 May 16
5
Transactions in RoR
Hi, Does anyone knows how to manage transactions in RoR. Thanx
2006 Apr 17
2
nesting layouts?
Hi all, Currently I am working on a site which in principle consists of three div''s, a menu, a left div and a right div. Now the content of the left and right div can vary wildly but the overall ''feeling'' should be the same. Now I have one template, called ''index.rhtml'' which checks in a long list of if-then-else what to render. This is of course
2006 Jun 15
6
[OT] Tables VS divs for form layout.
I''ve been using tables to get my forms to line up. ( I have usually one column for labels, and a column for values ). Should I be using divs instead? I''ve been reading some CSS design books lately. They tend to recommend divs over tables for general page layout stuff. But, what about the forms elements? What''s the ''best practice'' in this regard?
2006 Jun 22
4
stylesheet linking and layouts
In my layout, I have something like (shortened for clarity): <html> <head> <%= stylesheet_link_tag "index", :media => "all" %> </head> <body> <div id="site-container"> ... <cut for space> <%= @content_for_layout %> ... <cut for space> </div> </body> A view action has another stylesheet defined
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
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/.
2005 Mar 10
7
Order of Processing
It seems odd to me that the layout is processesed after the view. When I set a variable inside the view it does not have an impact on the layout file. But when I set it in the controller it does. Is this the way it works or is it possible that I am doing something wrong?