similar to: @content_for_layout or changing default fields on "new" page

Displaying 20 results from an estimated 10000 matches similar to: "@content_for_layout or changing default fields on "new" page"

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 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 May 01
5
Example using Builder::XmlMarkup and .rxml files?
Greetings, I''m a newby to both "R"s in RoR. I would like to use Builder::XmlMarkup to generate my pages. If there is a working downloadable example somewhere, that would probably be enough. Otherwise, here''s what I want to do: With the following controller: class AccountsController < ApplicationController layout ''accounts'' model :account
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 =>
2006 Jun 01
10
Stylesheets not being recognized
I am a newbie, but have worked through 4 or 5 tutorials. I am using InstantRails. The problem is that I cannot determine how the style is being included. I have modified the stylesheet from /public/stylesheets/, even removed it. All to no avail. The inline <style>...</style> code is still being included from somwhere. Where? What am I missing? thanks, steve -- Posted via
2006 Feb 25
1
checkbox helper question
I used scaffolding, then modified. As an after thought I added a "boolean" checkbox to my database, form with this tag <p> <%= check_box ''is_hot_item'', @photo.is_hot_item %> <label for="is_hot_item">hot item?</label><br> </p> I check it and save. But I don''t get 1 saved in my database field. :( I have just the
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'' %> <%=
2006 Jan 13
4
missing foreign key fields in scaffold views
Is there any reason that foreign key fields do not show in any of the scaffold views ? project table: id serial primary key, category_id integer, user_id integer, name varchar, morestuff varchar foreign key (category_id) references categories(id), foreign key (user_id) references users(id) scaffold generated views only show name, morestuff fields
2006 Jul 06
2
Scaffold with Foreign Key fields possible?
When you do a scaffold, is there a fast way to force it to let you enter in data for any foreign/primary key fields? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 07
2
How does layouts work?
When creating a scaffold you get a layout file. How does it work? I thought I would find the var @content_for_layout in the controller, but I didn''t. Where is layouts defined or controlled? -- Posted via http://www.ruby-forum.com/.
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
2007 Jan 23
7
RedCloth and SuperRedCloth
Good day to the parliament of RedCloth followers gathered here. Grave matters at hand!! I''m personally quite unhappy with the state of RedCloth and am reluctant to release the code in the repository. I can''t say if the code works with any confidence because I can''t generate the (Poignant) Guide with the current RedCloth. I know some things are fixed, but I''m
2010 Dec 25
6
undefined local variable or method?
I have: <%= form_for(@supplier) do |f| %> ....... ...... <%= render ''sector_categories'', :locals => {:f => f} %> in _sector_categories partial I have: <div class="field"> <div id="category_update"> <% for category in @categories %> <%= f.check_box :category_ids[], category.id,
2007 Oct 04
12
Rails' abilities fitting?
Hi, I''m looking at developing a reasonably complex web application, where most of the complexity actually lays in the database and the queries I need run on it. Some "classes" or models need to consist of an assembly of several tables. It would be trivial enough for me to code these queries in SQL, but as far as I understand Rails is trying to hide the database as
2005 Jan 28
16
primary_key_prefix_type, support for non-integer primary keys
Hello! I''m just starting out with Rails--and Ruby itself for that matter--and have a couple of questions regarding primary_key_prefix_type and non-integer primary keys. I see in the ActiveRecord documentation [1] that by default the primary key of a table "foo" is expected to be "id", though primary_key_prefix_type this can be changed to :table_name or
2006 Sep 06
1
Changing Scaffold
Hi, I am starting a project in rails and I wish to change scaffolding. I''ve already done some changes like prepare all texts for locale. Now I am wishing to change the way it generates the _form partial. Could someone give some guideline so I can study such thing? I saw "template_for_inclusion" in form.rhtml but couldn''t find out how to change it. Being more
2006 Feb 11
7
Menu Helper
Hi all, I''m trying to add a common menu to all pages in my application. It is just a set of links I want to display. I''m having trouble deciding where to put the code. Below is what I''ve tried to get out of the "Four Days on Rails" tutorial but no luck. Any help would be appreciated. Am I on the right track? Thanks, Sam