similar to: Scaffolding Results Format

Displaying 20 results from an estimated 30000 matches similar to: "Scaffolding Results Format"

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
2009 Dec 10
2
How to customize the default scaffold?
I know the scaffold generator is really only useful for beginners and/or very the preliminary state of a project, but I find that I use it a lot (especially, since I am still a beginner). There are a couple of things I find myself tweaking (or wanting to tweak, but never getting around to tweaking) each time I generate a new scaffold: 1) Change the layout from blah.html.erb to
2006 Jan 31
3
Lost in routing
I''m trying to create a modules based system where my controllers are all under modules. So the structure looks something like: app/ controllers/ message/ news_controller.rb email_controller.rb library books_controller.rb pictures_controller.rb home_page_controller.rb Each of those controller has
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 Jan 28
10
Rails scaffolding - cannot get access to MySQL
Hi, A newbie in the RoR world, I''m already more or less stuck when generating the scaffold for my first tutorial project ... When I try to generate scaffold code for my version of the ''depot'' application from the ''Agile rails ...'' book, I receive the following error: #28000Access denied for user ''bo''@''localhost''
2008 Feb 21
1
Creating incorrect plurals when generating scaffold
Preface: I''m trying to find my way through the "Build Your Own Ruby on Rails Web Application" book. I''m completely new to programming and am having a hard time figuring out the differences between rails 2.0.2 and what''s in the book so please forgive me if this is a stupid question. I''m confused because I finally thought I''d figured out the
2006 Mar 09
8
Problem with scaffolding and table name
Hello, i''m new in ruby rails framework. I have the following problem. I try to create a scaffold for a certain model of my db, but since ruby rails doesn''t assume the table name corectly (its incidents_reported ) i get errors .... Besides renaming the table :) is there a way to ''tell'' ruby rails the name of the table? I haven''t been able to find any
2006 Jul 19
4
How do I overwrite/extend a scaffold module?
I have many pages to generate quickly. They are based off of the scaffold generator, but I want to convert the rhtml files to Markaby, and change some formatting. Without having to do a lot of repetitive hand editing. Is there a simple way to overwrite/extend part of the scaffold generator? Do I need to write my own from scratch? -- Best Regards, -Larry "Work, work, work...there is no
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 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 Jul 04
3
scaffolding
hi , i used the folllwing command to scaffold, G:\my\webblog>ruby script/generate scaffold webblog id:integer title:string body :text created_at:datetime after when i migrate with the follwing command rake db:migrate i got the error as (in G:/my/webblog) == 1 CreateWebblogs: migrating ================================================ -- create_table(:webblogs) rake aborted! Mysql::Error:
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 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:
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
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 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 May 31
7
Getting 22 elements
Hello, I''ve done === class HomeController < ApplicationController def index @country = Country.find(:all, :include => "cities") end end === And rhtml is: === <% @country.each do |country| %> <h1><%= country.name %></h1> <% country.cities.each do |city| %> - <%= link_to city.name, :action =>
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
2008 Jun 22
3
Routing Error No route matches "/employee/list" with {:method=>:get}
hi, I am very frustrated by this error when I just put together a very simple project from one of the textbook on RoR: Routing Error No route matches "/employee/list" with {:method=>:get} For your reference, #The following is EmployeesController.rb class EmployeesController < ApplicationController scaffold :employee # create scaffold code for controller #
2006 Mar 14
4
What does the send() method do on a model object?
All, I did a scaffold for a model and I ended up with this code in list.rhtml: <% for column in TargetList.content_columns %> <td><%=h target_list.send(column.name) %></td> <% end %> Where is the "send" method and what does it do? I can''t find it on ActiveRecord::Base? I assume that it returns a value based on the column id but I