Displaying 20 results from an estimated 30000 matches similar to: "File upload generated with scaffold ?"
2005 Dec 27
1
filecolumn to database
Hi,
I''m using filecolumn to upload a file to mysql blob :
_form.rhtml : file_column_field "entry", "attach"
model (rb file) : file_column :attach
How can I update controller create function to insert file in database ?
redefine model save function ? Someone has a sample source ?
Regards,
Fabian
2006 Jan 05
0
Re: html generated from scaffold
On Jan 5, 2006, at 9:02 AM, Jim wrote:
>
> Question 1: In a scaffold-generated view, wouldn''t it be better to
> generate more user friendly rhtml and code? I mean, it generates a
> loop
> that goes through each column in the database table and generates html
> table columns from these. I''m sure it''s very efficient and has
> hyper-ruby-coolness,
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
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 Aug 07
0
Doubts after generating with scaffold
Hi you all, after creating an app I used the script scaffold to generate
the whole thing. After this, I have several doubts about the code
generated:
- ?def index?: This method calls the method ?list?. However, to display
the template ?list.rhtml?, it also calls the ?render :action=>?list? ?.
Why? I mean, if we have previously called the method ?list?, this method
would also render the
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 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
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 Aug 13
0
Problem generating scaffold using modules
I am trying to create an Admin module that has multiple controllers. For
each of the controllers, I would like to use scaffolding to generate the
initial models, views, and controllers.
I created the admin controller using "generate controller Admin index".
This created app/controllers/admin_controller.rb and
app/views/admin/index.rhtml.
When I point my browser to localhost/admin,
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
2005 Dec 24
2
Common menu
Hi,
I''m releasing my first rails application and I''d like to have a common
menu in all my templates.
Do I have to include an rhtml from .rb or other rhtml ? Some sample code pls
?
Regards,
Fabian
2008 Jan 18
1
Announcing: Ext Scaffold Generator Plugin for Rails
The Ext Scaffold Generator Plugin can be viewed as a drop-in
replacement for Rails'' standard Resource Generator. Accepting the very
same options, it will generate views using data grid and form
components from the Ext JS Javascript GUI framework as well as a
controller acting as an Ext-compatible JSON web service. The generated
code can be used as a starting point for further
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 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 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 Mar 29
4
Scaffold generator: create vs. new
Can anyone supply me with a simple, succinct explanation of what the
difference is between the "new" controller and the "create" controller
that the scaffold generator produces?
I run:
> script/generate scaffold modelname controllername
And now I need to do some work inside the controllername.rb file. For
example, pulling a list from another database table to supply