Displaying 20 results from an estimated 7000 matches similar to: "What is the different between Scaffold / Controller / Model"
2006 May 29
4
has_many <-> belongs_to trouble
Hi all, finally im starting with rails, i have a simple relationship
has_many ans belongs_to that i dont now how to manage the update action,
here are my models
class Item < ActiveRecord::Base
has_many :images
end
class Image < ActiveRecord::Base
belongs_to :item
end
And my table structure:
Items => id, title, desc
Images => id, image, item_id
ok, i have a number of
2006 May 06
4
Scaffold Uses Wrong Host for MySQL user
I''m following the example Depot app in Agile Web Development with Rails.
The scaffold fails because it is not using the correct host for the
user. Here is the error that the scaffold emits:
Access denied for user ''jimmy''@''%'' to database ''depot_development''
The MySql user ''jimmy'' was created with the host of
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
2006 May 30
6
How to solve "Marshal Data Too Short" error?
Hi
I''ve got the error in the log file "marshal data too short" after I try
to store some data into session.
After doing some research on the internet, it looks like the problem was
caused by pstore.rb. It is there way to solve this problem?
Thank you
--
Posted via http://www.ruby-forum.com/.
2006 Feb 09
13
Howto work with a page not generated by the scaffold ?
I am a newbie Ruby and RoR user. In my tests using the turorials that
I found over the web, everthing is working fine and I am very impressed
about RoR framework.
As I am a Delphi developer, without any web development experience,
There is some thing hard to understando and I didn''t find a tutorial
about this.
I wonder how to create a non-scaffold page ? I have customers,
2010 Aug 24
3
can not execute ruby script/generate scaffold Product Admin
in my depot application, i need to execute this command correctly...but I
can not do anything! the command could not execute as it is stated and
figured in the book. if there is an equivalent command for creating and
Model Product under Admin controller, please let me know. Now I know how to
configure mysql with rails. So there is no problem.
--
Irfan Ahmed Rizvi
http://www.creativemake.com
--
2007 Dec 22
8
Rails 2.0 scaffold
Hey guys,
I posted the other day about scaffold not working and i was told that it
was rails 2.0 doing this. (btw i''m using adgile web development)
I have read on the internet that you need to put extra stuff like title,
description......
So i did this:
C:\ruby\depot>ruby script\generate scaffold Product Admin id:int
title:varchar(1
00) description:text image_url:varchar(200)
2006 Mar 28
1
Master - Detail Form
Hi, I''m new with RoR. I''m trying to do a master-detail CRUD form, using
generate scaffold.
The problem I''m facing is that I have to keep the parent id through the
detail view all the time by hand. Is there any example or way to see how
to do it properly?
Thanks.
Fernando.
PS: For further information, I have a Task and the Tasks have Items, so
when I want to add an
2008 Jan 18
15
scaffold :product missing in Rails 2.0.2 version of depot tutorial?
I am getting an error when I try to run the code for the depot
application (page 67 in the Agile Web Development on Rails book, 2nd
edition). I built the complete depot app with Rails 1.2.6, and all
worked well. I then updated to Gem 1.0.1 and RoR 2.0.2, and attempted
to repeat the tutorial, and got this strange behavior.
I used "rails depot --database=mysql" because I have not
2006 Apr 03
18
newbie generate scaffold
Hi Guys
First time on the list and pretty new to the rails way of doing
things, yup I know sorry.. another newbie!
anyway, apologies out of the way, this is the problem I am having...
I have purchased the "Agile Development with Rails" book and have
just started running through the ''Depot'' demo application.
I have got to page 57...
I have my project files all
2006 Apr 20
8
generate scaffold not generating views
Hi!
Sorry for the newbie question...
I''m following the depot example in AgileWebDevelopmentWithRails.
Stangelly, generating scaffolding using the command (page 53):
./script/generate scaffold Product Admin
does not generate any .rhtml file, but just:
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists test/functional/
2006 Feb 26
17
please help: having problem with the scaffold commad, mysql.
i just recently purchase agile web dev book about ruby on rails and
going through the whole project. well i am now stuck on creating the
scaffold. I have been messing with settings for awhile now. here is the
error:
koloa@ubuntu:/var/www/depot$ ruby script/generate scaffold Product Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists test/functional/
dependency
2006 Apr 20
1
generate scaffold not generating views
Hi!
Sorry for the newbie question...
I''m following the depot example in AgileWebDevelopmentWithRails.
Stangelly, generating scaffolding using the command (page 53):
./script/generate scaffold Product Admin
does not generate any .rhtml file, but just:
exists app/controllers/
exists app/helpers/
exists app/views/admin
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 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;
2006 Sep 26
1
Error while generating scaffold
Hello,
When I run the command:
"ruby script/generate scaffold Product Admin"
I receive the following error after the usual changed files info:
"Couldn''t find ''product'' generator"
The command is based on "Agile Web Application Development with Rails"
first edition on page: 57. Just to give some context to what I am
doing, I just created
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 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''
2006 Feb 28
10
Scaffold command, how and what may be wrong?
hi everyone. I am learning RoR and just recently purchase the agile wed
dev on rails. i am still at the beginning of the book trying to create
the scaffold for the depot_development database. Everytime i run the
generate scaffold products admin, i recieve the "before building the
scaffold, try to create a table for model products" etc...
a few questions:
1. How does ruby know that
2006 Jul 22
2
Error: Before updating scaffolding from new DB schema, try..
Hi, I''m going through the Depot tutorial in the book "Agile Web
Development with Rails" and I can''t even get past the very first step.
I''m getting the following error:
"Before updating scaffolding from new DB schema, try creating a table
for your model (Product)"
when I try to run "ruby script/generate scaffold Product Admin.
I have a table