Displaying 20 results from an estimated 10000 matches similar to: "scaffold/db problem"
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 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 Apr 03
2
undefined method `scaffold'' for #<LocationsController:0xb7a9e858>
Would anybody know why I get this error from this bit of code:
class LocationsController < ApplicationController
def index
scaffold :locations
end
end
This is the way that is demonstrated in the screencast for creating a
quick scaffold. I have done this before. However, I come back to
working with Ruby after about a month on something else and now it
gives this error.
Any
2009 Oct 10
2
difference scaffold model
Hi,
i am relativly new to Ruby and Rails.
My question is, why can''t i use respond_to and session[:....] in
ApplicationController created by a "ruby script/generate scaffold "
and in ApplicationController created by "ruby script/generate model "
i got errors like methode not know (for respond_to) or symbol as array
index for session access.
How can use this nice things
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
2006 Apr 07
1
Help... Ajax scaffold problems
Hi all,
Any help is appreciated. I used the ajax scaffold generator to make 3
scaffoldings. Then I put them together as components in a combined layout
and created a master controller, which happens to be named "dataentry''.
That works fine.
Within each of the components, I was able to set up links that paginate and
update the div (for the component) with correctly paginated
2006 Jan 10
5
Oracle 10g Express - generate scaffold gives error
Hello,
I have Oracle XE installed.
I have a table USERS.
When I try to generate a scaffold it gives me this error.
I tried also with Mysql and it worked.
E:\radrails\projects\MPS>ruby script\generate scaffold user
exists app/controllers/
exists app/helpers/
create app/views/user
exists test/functional/
dependency model
exists app/models/
exists
2006 Jan 15
2
scaffold suddenly pluralizing names
I haven''t updated rails today and all of a sudden scaffold is
pluralizing my names
ruby script/generate scaffold Admin::Category
produces
class Admin::CategoriesController < ApplicationController
Do I really want "CategoriesController" instead of "CategoryController"?
Thanks,
Peter
2005 Oct 21
8
Wrong number of arguments (1 for 0) on routes.rb
Hi,
I''m baffled by this error. I need a simple controller to send e-mails,
so first I thought about just creating the controller manually (without
using script/generate), since that didn''t seem to work, I created a
dummy table in my DB and used the usual procedure to generate scaffold code.
Then I modified the controller to have only two methods, send and compose:
class
2006 Mar 29
0
placing specific views within a subdirectory?
Can anyone show me how to go about placing specific views within a directory?
ie:
controllers/hello.rb
views/hello/english/world.rhtml
views/hello/english/people.rhtml
views/hello/spanish/mundo.rhtml
views/hello/spanish/gente.rhtml
instead of the usual:
controllers/hello.rb
views/hello/world.rhtml
views/hello/mundo.rhtml
hello.rb currently contains the basic methods:
class ChartsController
2006 Mar 03
0
error running generate scaffold - doesn''t see table which is there
Hi
I''m trying to get some basic stuff working from the "Agile Web Dev with ROR"
book - chapter 6 "Create the Maintenance App". (On linux, mysql 4.1, ruby
1.8.4)
I have the depot_development db created, and teh "products" table definitely
exists.
The user name and pw are correct in database.yml
But I get this:
<snip>
daniel@roomatthetop:~/work/demo$
2006 Jun 28
9
Scaffold Issue with Postgres
Hi guys,
I''ve been able to successfully install the postgres adapter for a remote
database machine to get rails up. My machine is running on Fedora 2.
Rails version 1.1.2. Is my yml config correct? I am getting this error
when I execute script/generate scaffold service_contents content :
exists app/controllers/
exists app/helpers/
create app/views/spiel
exists
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
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 05
0
iteration A1 in ebook: scaffold gets: routing error
hi, on page 82 of second edition, getting stuck after making:
class AdminController < ApplicationController
scaffold :product
end
running the server and going to: http://localhost:3000/admin gets:
ActionController: Exception caught
routing error
Recognition failed for "/admin"
did i miss a step somewhere?
thanks
---
vice-chair http://ocjug.org/
2006 Jun 06
0
Re: [ocruby] iteration A1 in ebook: scaffold gets: routing error
At 02:42 AM 6/6/2006, you wrote:
>hi, on page 82 of second edition, getting stuck after
got past that, must have been doing something wrong. ended up writing
the script below:
thanks
set -x
base=i:/work
PATH=/cygdrive/$base:$PATH
name=depot
cd $base
rm -rf depot
ls
mysqladmin -f -u root drop ${name}_development
mysqladmin -u root create ${name}_development
mysqladmin -f -u root drop
2006 May 03
6
Scaffold Generation Problem
Greetings all,
I''m sure there is probably a very obvious reason for the following
problem. However, after much hair pulling, I am just not seeing it yet.
As you can see from the trace below, I am not able to complete scaffold
generation due to some problem between rails and mysql. I double
checked MySQL to make sure both my Ruby user and Root user have full
rights to the database.
2006 Jul 28
2
Scaffold and Undercores in Tablenames
I am attempting to generate scaffolds on legacy tables that have
underscores in the name. Scaffold does not see the underscore. I have
tried a backslash escape but it no work. I have looked around but i
cannot find a way to make it work. It''s like this:
c:\railroad>ruby script/generate scaffold FOO_BAR
exists app/controllers/
exists app/helpers/
create
2006 Apr 11
0
Problem using generate/scaffold and FireRuby
Hi to all,
I am trying to use "ruby script/generate scaffold product". I always get
the message "uninitialized constant CHARACTER_SET". I have a products
table in a Firebird database called depot_development.fdb. Here is my
config file :
> common: &common
> adapter: firebird
> host: localhost
> username: SYSDBA
> password: masterkey
>
2006 Jan 16
3
the dreaded "Before updating scaffolding from new DB schema, try creating a table for your model (Blog)" error
Hi
Can any one help me with this? I think that this is soemthing quite
simple as there is quite abit traffic about this on the web and everyone
sems to figure it out. I have tried most of the solutions that I can
find. but nothing.
I have mysql 5.0.11 working on linux redhat 9. ruby is working rails
install mysql library seem to be there.
to some trying rt get mysql to install need to