Displaying 20 results from an estimated 20000 matches similar to: "numeric (decimal) WITH precision and scale at generate scaffold time?"
2010 Apr 03
2
Specifying a decimal field precision/scale with scaffold requires 2 steps?
Hi,
It appears to me that the command:
ruby script/generate scaffold whatever money_field:decimal(10,2)
will not generate a valid migration.
Therefore it appears to me only two ways to achieve the desired result
is:
1.1 Omit the the precision/scale on the scaffold command
1.2 Edit the migration file by following the "do |t| ... end" with
the command:
change_column :whatever
2010 Mar 10
2
Decimal fields generated in Rails 2.3.5 act like strings, sort of
Hi All,
I just created a new CRUD "expense" (using Rails 2.3.5 scaffold) which
included "amount:decimal". When I:
1. populated the amount field of a new expense with 5 characters:
12.50 and
2. saved the new record
I got a display of the new record that showed Amount to be merely
"12".
I clicked Update and put my cursor over the data field for Amount and
got a
2006 Apr 24
3
quick q on script/generate scaffold
I want a scaffold to manager both products and users. To get the
products scaffold I used
script/generate scaffold Product Admin
if I use,
script/generate scaffold User Admin
will it overwrite my product admin controller? Would I be better off
doing
script/generate scaffold User User_Admin or something?
--
Posted via http://www.ruby-forum.com/.
2009 Apr 12
0
Heroku Garden - reversing or changing a 'generate scaffold' command
In Heroku Garden, is there a way of reversing or changing a ''generate
scaffold'' command?
I often find I need to make changes to the scaffolded application but
I do not know how to.
''script/destroy scaffold Modelname'' from the console doesn''t seem to
work.
For example, I generated a Product scaffold in Heroku Garden.
When I try to destroy it using the
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
>
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 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
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/
2005 Dec 02
3
yaml Error When Trying to Generate Scaffold
Hello there,
I am a Ruby on Rails newbie, and have been reading the book, "Agile
Web Development with Rails", by Dave Thomas.
Seem to be stuck on page 57, when trying to invoke "ruby script/
generate scaffold Product Admin"...
My depot/config/database.yml file''s contents are:
development:
adapter: mysql
database: depot_development
socket:
2006 Jun 25
0
Generate scaffold should create tests, discuss
I think script/generate scaffold should create corresponding tests
(unit tests, in particular). Almost everyone new to rails learns by
looking at the code that scaffolding creates, and people could also
learn by looking at test code generated. Also, it would form a good
starting point for TDD, if you''re into that sort of thing. Ok, so the
main benefits of tests being generated are for
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$
2005 Dec 17
3
Can scaffold generate listboxes in views? I''ve been unsuccessful.
I''ve created several different Rails applications but I''m running
into the same trouble with each one. Lets say I create an app called
Test. I type ''rails test'' and it generates the directory for me.
Now I edit my database.yml file. Then I create a database with
Postgresql by typing createdb test. Now I go into Postgresql by
typing ''psql
2006 May 08
1
script/generate scaffold errors
Hi,
I''m following the Agile Development With Rails book and having some
trouble. Specifically, I''ve typed:
% ruby script/generate scaffold Product Admin
and received the following error:
/usr/local//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/hash/keys.rb:27:in
`symbolize_keys'': undefined method `to_sym'' for
2006 Jul 06
5
Generate scaffold failing
Hi all,
Got a Win2k3 Server box (but this has been verified not to work also on
WinXP Pro SP2) with:
Ruby 1.8.2
Rails 1.1.4
PostgreSQL 8.1
The generate\scaffold script fails to generate the files inside the
app/model/views directories. It actually generates the view directory
but fails to produce any files.
The same thing works perfectly when I''m targetting MySQL.
So is this normal
2018 Jan 25
0
Geometry delaunayn and deldir results, differing results from Octave due to decimal precision?
I just looked at the data at the URL you posted and it looks like it
consists
of all the points in a rectangular grid. When you triangulate a rectangle
it is
arbitrary whether you use the SW-NE or the SE-NW diagonal and that looks
like the only difference between the various algorithms.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Jan 25, 2018 at 5:14 AM, Yuen, Kam <k.yuen at
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
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 03
0
AR::Base.pluralize_table_names doesnt work with scaffold generator, right?
Hi!
The script/generator scaffold for models doesnt respect (source in) this
config/environment.rb setup, right?
Because I can put in there ActiveRecord::Base.pluralize_table_names =
false but when I run a command like
ruby script/generate scaffold model Something
then it throws an error saying that my database scheme doesnt have a
Something. However there is a table called something.
If I
2007 Aug 06
0
Problem generating scaffold with a namespace
I''m trying to generate a scaffold based on a model in a namespace and
I would like the controller to have a similar namespace.
Am I thinking that scaffold should be doing something it doesn''t or is
this a bug?
rails version: 1.2.3
ruby version: 1.8.5
OS: OS X 10.4.10
Created a model using
> script/generate model Foo::Bar
creates the model bar.rb in the model/foo directory
2010 Aug 06
0
adding options to erb scaffold generator to include or skip custom views / templates
created a small patch.. looking for feedback / etc..
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5319-adding-options-to-erb-scaffold-generator-to-include-or-skip-custom-views-templates#ticket-5319-2
When I was working on customizing the erb scaffold generator to match
the style and design I wanted to use by creating custom templates in /
lib/templates/erb/scaffold I found