similar to: why scaffold.rhtml?

Displaying 20 results from an estimated 30000 matches similar to: "why scaffold.rhtml?"

2006 Jan 18
3
Documentation for scaffold / views
Apparently a scaffold creates at least one instance variable for views to use, and if I override the scaffold then I must also explicitly create that instance variable for the view. I''d like to know exactly what work is performed by the scaffold so that I can know this when over-riding the view. (OR, is it that the controller makes these variables available by default?..) EXAMPLE:
2005 Dec 29
2
validation highlighting on non-scaffold fields
Hi all, I''m new to rails. I have created a bunch of CRUD code using scaffolds. I had to add code to the default output to account for fields that establish the relationships between tables. Everything works well, including the validation of the fields I added. However, I can''t get the highlighting to work for my fields when they fail validation and the view is redisplayed.
2005 Aug 18
10
Scaffolding, DRY and RHTML
Hello all, I''m working on a couple of Rails projects at the moment and have noticed something that seems to go against the DRY principal. Why, when scaffolding, are individual CRUD rhtml files created instead of using one as a partial and having the others use that single partial? This especially applies to the list rhtml. I am about to get to the other operations and see how feasible
2006 Mar 03
2
newbie scaffold question
I''ve got a database with several tables. I''d like to create scaffolding for separate CRUD interfaces for several of these tables. I''m hoping that the scaffold generator can create the CRUD code for all these tables in ONE controller, but I don''t know how to tell it to do that, if it can. Can anyone verify if this is possible? Thanks, David -- Posted via
2010 Jul 04
3
Generated By handling CRUD Scaffold
Good afternoon. I have two questions: First question: Can be defined at the time that I''m generating the scaffold the size of a string? For example name:string (50)? Second question: I wonder how to proceed correctly to include new fields starting at a CRUD generated by scaffold. Example: First step (I use): script/generate scaffold User name:string login:string Second step (I add
2006 Feb 06
0
Scaffold for AWS (webservice)?
Hi, Have I missed there being any (extra) scaffold capability in ActionWebService (AWS)? I know about web_service_scaffold placed within a Controller class, which generates WS functionality based on the Api. But might there somewhere be a means to get AWS generation of Api and Controller code that automatically exposes all an ActiveRecord model class''s CRUD member operations as
2005 Oct 25
2
generate scaffold ignores controller parameter
Since I upgraded from Rails 0.13.1 to 0.14.1 "generate scaffold <Model> <Controller>" doesn''t take any notice of the controller parameter. Anyone else suffering from this? E.g.: C:\Ruby\work\test>ruby script\generate scaffold User Admin exists app/controllers/ exists app/helpers/ create app/views/users exists test/functional/
2006 Apr 05
13
scaffold misuse?
Running ruby script/generate scaffold Product Admin is a wonderful way to set up well, exactly what it says, a scaffold. My problem is that I have several other tables that are linked, through foreign keys, to the Product table. Say an "authors" table. Now when I go enter a new product, a book, I want the application to provide a drop down list of authors generated from the records in
2006 Mar 28
2
Problem with generating a scaffold with an Oracle DB
Hi all, I have confgured my oracle application with the Oracle Express Production release database. This all is configured well and tested(I can see that he founds the database). However, when I generate a scaffold application there is no view for the CRUD functions created for the application. Below is listed what is generated for me for a Products table: E:\workdir\ruby\depot>ruby
2006 Aug 13
5
Newbie question: scaffold not working
I went through a tutorial at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 to get started with RoR. I really like the idea of the scaffold construct, but I can''t seem to get it to work the way it was described in the tutorial. I''ve got a mysql database that is properly configured, and a table called ''quotes'' with a column called
2006 Jun 12
3
Weird problem related I am having with scaffold
i, I have this in expense_controller.rb: class ExpenseController < ApplicationController scaffold :expense end It works fine, but let''s say I want to override scaffold''s list. For some reason, just making list.rhtml in views\expense is enough, and there''s no need to add def list end in expense_controller.rb. However, that''s not my real problem. Now
2009 May 27
4
Scaffolding Results Format
Hi Everyone, I built a scaffold and I''m having trouble getting results properly formatted. (I need to get the data into multiple columns instead of just one big column) I can''t get all of my CSS to work properly in scaffold.css, layout/books.rhtml, or the books/index.rhtml.erb Anyways, maybe you have a suggestion. Default view (127.0.0.1:3000/books) Title Abstract
2006 Aug 17
6
NameError in AdminController#index building scaffold
I''m a pretty big newbie with ROR, but when following a tutorial I encounter an ugly error when building a scaffold. Here is my environment Dev system: - Windows XP - java version "1.5.0_06" - MySQL java version "1.5.0_06" - Ruby 1.8.4 - Ruby Gems 0.9.0 - Gem install mysql Successfully installed mysql-2.7.1-mswin32 Installing ri documentation for
2006 Jul 27
0
CRUD, REST and associations
Let''s say I have the model class Reader and Magazine, connected by join model Subscription. It looks something like this class Reader < ActiveRecord::Base has_many :subscriptions, :dependent => :delete_all has_many :magazines, :through => :subscriptions validates_presence_of :name end class Magazine < ActiveRecord::Base has_many :subscriptions, :dependent =>
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All, I''ve been playing with Rails - did the recipe/category sample from onLamp.com - fairly straight forward - even got it working against postgres. Anyway, I''ve been appling rails to a small test project and I can''t seem to get the syntax down or find a sample of how to use the date control on a custom new/edit view. The CRUD (is that right?) that automatically
2006 Aug 18
0
Why does scaffolding''s list.rhtml use "foo.send(column.name)" ?
HI all, I"m using 1.1.6 script/generate scaffolding. Why does the view/foos/list.rhtml use "foo.send(column.name)" to display the contents of each column? I had to change this to "foo[column.name]" to get the display right in a couple of models. Specifically, one model has a column named ''display'', is that conflicting with something internally to AR ?
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box displayed at the top of the checkout as described in the tutorial and I cannot seem to discover where I have erred. The scaffold.css is copied from the pragmatic programmers site: #-------------------------------------------------------------------- $ cat public/stylesheets/scaffold.css body { background-color: #fff;
2008 Nov 08
8
scaffold not working like i hoped......
Hi: i''ve tried this on three macs (tiger, panther, etc).. and my ROR is up to date on each. My models and controllers aren''t displaying all my mysql db fields. When I run script/generate scaffold Planner ... it builds the controller, model, and all the rest. When I go to test the app and new controller, now called planners no content is listed... and all I ever get is the
2006 Aug 18
3
Understanding MVC - view customization after using scaffolds
All, I have ordered AWDWR and am anxiously awaiting its arrival. In the meantime I still am playing with ROR using radrails. I have a few questions ... I create a table named customers with the following details: Field Type Null Key Default Extra id int(11) NO PRI auto_increment customer_name varchar(50) NO inbound_retention int(11) NO outbound_retention int(11) NO unix_admin_email
2006 Apr 25
1
Validations
Hi to ALL! I am developing the small shopping cart application. Inn the I created the models with out crud (not with scaffold) I wrote my own htmls as for requirement. How can i wrote the validations for my own rhtml files Urbain -- Posted via http://www.ruby-forum.com/.