Displaying 20 results from an estimated 11000 matches similar to: "Can scaffold generate listboxes in views? I''ve been unsuccessful."
2006 May 28
3
Working with topics and categories
Hello guys,
I''m a newbie in RoR and I have a problem. My DB structure is
======================================
topics table : id(int,11)
name(varchar,255)
categories : id (int,11)
topic_id(varchar,255)
name(varchar,255)
======================================
--Models:--
class Topic < ActiveRecord::Base
has_many :categories
end
class
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
2005 Mar 06
3
permission error in rake''s clone_structure_to_test
Hello,
When I try to run "rake clone_structure_to_test" on my project, I get
the following errors:
$ rake clone_structure_to_test
(in /home/www/cedscreening)
psql:db/development_structure.sql:8: ERROR: permission denied to set
session authorization
psql:db/development_structure.sql:16: ERROR: permission denied for
schema public
psql:db/development_structure.sql:34: NOTICE: CREATE
2005 Dec 27
2
NoMethodError in new scaffold
Hi All,
I created a new rails application using rails 1.0. I used "ruby
script\generate scaffold" for each of my tables. This worked on all but
2 of my tables. When I go to the new or edit action of my requests or
admins table, I get the error below.
On one table called admins I hadn''t followed the correct naming
convention and wasn''t able to edit or create
2006 Mar 15
10
Scaffold with Foreign Key
I have two tables:
------------------------------
drop table if exists users;
create table users (
id int not null auto_increment,
username varchar(100) not null,
password varchar(20) not null,
firstname varchar(20) not null,
lastname varchar(20) not null,
primary key (id)
) TYPE = InnoDB;
------------------------------
drop table
2006 Jan 02
3
rake test_units not loading any fixtures
Hello All,
If I run my unit tests individually using Ruby, they all work correctly.
However, if I try to run them using "rake test_units", I get a bunch of
error messages.
The error messages appear to be caused by rake not loading any of the
fixtures into the test database.
I am using PostgreSQL on Windows.
Does anyone have any suggestions?
Many thanks,
Bruce.
--
Posted via
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)
2005 Jan 21
2
collection_select
I''m trying to use collection_select, but it''s not working as I expect. The
list populates correctly but the current value is not selected.
@question contains a topic (via topic_id), and @topics is the list of all
topics. Here''s my attempt to create a drop-down list of the topics.
form("question") do | form |
form << content_tag("b",
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
2008 Jul 09
11
script/generate scaffold user
NameError in UsersController#index
uninitialized constant UsersController::User
RAILS_ROOT: C:/RailsApps/rgams
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in
`const_missing''
app/controllers/users_controller.rb:5:in `index''
2005 Jun 16
3
PostgreSQL Scaffold Doesn't Insert PK?
I am new to Rails and Ruby. I''ve been a WebObjects developer for a few years
and before that J2EE (shudder). I wanted to try RoR so I am porting an
existing Web app.
I am running the latest release on Tiger and PG8.
Right now my single table has three attributes:
id | integer | not null
hotel_name | character varying(255) | not null
hotel_location |
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/
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
2009 Jun 23
1
[PATCH server] added ovirt-wait4service and invokation in installer to wait for psql/ldap
FIXME this patch isn't complete, still need to figure out the ldap command to
wait for that service, something along the lines of:
ldapsearch -b dc=priv,dc=ovirt,dc=org -x
(but how will we parse the base from the installer? also this cmd
fails, how to fix?)
---
installer/modules/ovirt/manifests/ovirt.pp | 8 +++++-
installer/modules/ovirt/manifests/postgres.pp | 13 ++++++---
2007 Jan 31
2
has_many :conditions
Is it possible to put conditions relative to the current instance in
has_many''s :conditions?
For example, in a forum app:
class Post < ActiveRecord::Base
belongs_to :topic
has_many :self_and_descendants, :class_name => "Post", :order =>
"lft",
:conditions => "topic_id = #{topic_id} AND (lft BETWEEN #{lft} AND
#{rgt})"
end
With the
2009 Mar 08
2
RESTful nested resources and polymorphism?
With ref to my previous post: http://www.ruby-forum.com/topic/180356
I am now able to access items from topics controller. However, now I
need to add sub-item e.g.: An item itself could have many sub-items. So
my items model is like:
class Item < ActiveRecord::Base
validates_uniqueness_of :title, :scope => [:topic_id]
validates_presence_of :topic_id, :title, :owner, :position
2011 Dec 01
2
R, PostgresSQL and poor performance
Hi List
Apologies if this isn''t the correct place for this query (I''ve tried a search of the mail archives but not had much joy).
I''m running R (2.14.0) on a Mac (OSX v 10.5.8, 2.66GHz, 4GB memory) and am having a few performance issues with reading data in from a Postres database (using RPostgreSQL). My query / code are as below
# -----------------------------
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:
2009 May 11
7
Contribute request
Hello!
I was advised by the forum moderator to ask for contribution:
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=20223&forum=38&post_id=76546#forumpost76546
My wiki login is VladislavRastrusny
I would like to contribute for Tips & Tricks section with a small
automated script to install webmin repository data and webmin itself
from here:
2005 Oct 28
3
PostgreSQL. Multiply schemas in one database. How to?
Hi all.
I am using PostgreSQL in my current project and I have couple of questions
on this topic.
Previously I have used 3 databases for project. i.e.
megaproject_development, megaproject_test and megaproject_development.
But I don''t like this variant because of ''rake dump_db_structure'' writes a
lot of PostgreSQL specific data for structure file (operators, functions,