similar to: newbie scaffold question

Displaying 20 results from an estimated 20000 matches similar to: "newbie scaffold question"

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 Oct 12
7
Evil Scaffold
I read the Amy Hoy''s presentation on why scaffold is not a good thing for beginners. For admin application, is it ok to use scaffold? --~--~---------~--~----~------------~-------~--~----~ 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
2006 Mar 28
5
combining two models in one controller/view "set"
I''m going to take another stab at this question (my first one received no replies): I have two models: Author has_many: books Book has_one: author I have two tables: authors id ... books id author_id ... I let the scaffolding fly and it created the CRUD goodness for each model, as expected. However, I want to have only one view/controller "set" for both models; when I
2006 Jul 28
8
Building a Search Page as part of CRUD
I''ve been experimenting with Rails over the past couple of days and have come across something that seems harder than it should be. In previous frameworks I have used (WebObjects, php) a full search page (which leads into a list view populated with search results) was part of the CRUD that was either dynamically or statically created after specifying table/object schema. In
2007 May 27
3
Scaffold and foreign keys
Hello, I create a migration to add a foreign key ''page_id'' to a table ''main_sections''. After running the migration and adding the column, the scaffol that I have on the main_setions table does not add the foreign key into the CRUD. Any ideas why this is the case? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because
2006 Jul 26
3
newbie: Scaffold doesn''t pickup DB changes
I''m following along with the depot example in ''Agile Web Development'' and ran into a problem with Scaffold. I changed the MySQL table structure to add a few columns directly and also tried the migrate script to change the database after I got the initial scaffolding to work. However, I can''t seem to get the new columns to show up and am stumped as to how I can
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 Apr 06
3
scaffold question
there are some things on a scaffold that i would like to use without the whole thing. is it better to generate one and then cut it down to only what you''ll use? are all of the things in a scaffold available to just build by hand? for instance, i have a scaffold for my users. in the list action, it has @user_pages, so that you can put @user_pages.current.next or something like that -
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
2007 Dec 10
15
Scaffolding for pre-existing database table in 2.0.1
Hi, first of all I will apologize in advance for my presumably noobish question, but I''m only starting to learn Rails and am a little confused with all the changes in 2.0.1. There are as good as no tutorials out yet and the 2 or 3 screencasts I''ve seen deal with the creation of both the app and the database. Now my problem is that I already have a database with a fair amount of
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 May 03
5
Multiple Scaffolds
I''d like to create scaffolds for each of the tables in my database, but would like to access them below the path: localhost:3000/admin For example localhost:3000/admin/table1 localhost:3000/admin/table2 Where table1 and table2 would be the controller names respectively, calling their own list.rhtml, show.rhtml, edit.rhtml, etc.. Any recommendations on how/where to
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
2010 Aug 12
10
Scaffolding working...kinda
Hello all. I''ve been working through some online tutorials, learning ROR and have a question on scaffolding. Through the command promt i''ve ran the command: $ script/generate scaffold Albums This created the controllers, helpers, models, and views. I have a database table titled "albums" and have two records saved within The problem is that the scaffold command did
2006 Jan 27
6
Scaffolding to use has_many and belongs_to ?
What does everyone on this list think about enhancing scaffolding somehow so that a "has_many" relationship will automatically drop the <select> box into the view to reference the "belongs_to" part of the view? I think scaffolding is great but I am always adding the <select> boxes to reference the parent association. Do you think this would be useful? just a
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
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 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 Mar 23
6
easy scaffold question(s)
I''m doing very well with the Hibbs Rolling on Rails tutorial. I have an easy question for my personal notes. I''m coming up with a simple framework of steps for creating a basic database. It includes the following maxims to make original app creation easy: app_name = MySQL database name SQL_tablename = model_name model_name = controller-name Is this going to work for getting
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did