similar to: customizing scaffold_generator.rb to add :maxsize

Displaying 20 results from an estimated 3000 matches similar to: "customizing scaffold_generator.rb to add :maxsize"

2006 Oct 28
2
where is the "record" method??? i.e. which is used in generators (e.g. scaffold_generator.rb)
Hi, Anyone know where the "record" method is defined. Its used in generators like in the scaffold generator. An extract from it is below (taken from scaffold_generator.rb): def manifest record do |m| # Check for class naming collisions. m.class_collisions controller_class_path, "#{controller_class_name}Controller",
2006 Jul 15
7
:maxsize => 30 in form not working
Well, I''ve researched the books and the web to no avail (I tried the search here too but kept getting page not found.I''m doing what the examples say to do but I cannot get this work. The form allows entry of characters beyond the maxsize which causes the app to abend giving me the browser page showing a trace with the following info preceding the trace: Mysql::Error:
2006 Apr 25
2
Noob Question: REgarding Forms ( Take 2 )
I''m hoping there''s an easy way to do this. I''m trying to read options from a database, and insert them into form tags. So for example, In the Database Table: options size: 300 type: text_field maxsize: 300 and I want to create a text_field form tag, with all the appropriate options, is there an easy way to do this, other than having the code output the HTML
2008 Sep 10
0
wrong number of arguments
I am a newbie at rails and can''t figure out the following problem. Can anyone help? I am running the following: Ruby version 1.8.6 (powerpc-darwin9.4.0) RubyGems version 1.2.0 Rails version 2.1.0 Active Record version 2.1.0 Action Pack version 2.1.0 Active Resource version 2.1.0 Action Mailer version 2.1.0 Active Support version 2.1.0 I created three models 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 >
2009 May 06
0
Maxsize error in excel creation
hai, I am making an excel file with spreadsheet-excel 0.3.5.1.I found a MaxSizeError when generating a large file.How to solve this problem.Could anyone know how to solve this problem? thanks, -- Posted via http://www.ruby-forum.com/.
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out why I keep getting the ''wrong number of arguments (1 for 2)'' error with the following code when I try to create a new record. If anyone can see what is going wrong here please help! new.rhtml ------------------------------------------------- ... <%= start_form_tag :action =>
2006 Feb 21
2
ActiveRecord before_ callbacks question
Hi! I need to set the primary key in a model and postgres table to something different than id. View Edit and such works in the scaffolded controller. However if I click in the controller below the list of data onto New then I get an error message like this: Showing app/views/admin/_form.rhtml where line #5 raised: undefined method `nr_before_type_cast'' for
2005 Mar 12
0
scaffolding issue
i''ve got a little rails app i''m messing with the schema is create table timedatevalidates ( id serial, timedatetovalidate timestamp, primary key (id) ); the mvc was initialized using rails scripts/generate scaffold timedatevalidate i''ve got this in a subdir of webroot and have modified .htaccess and config/routes.rb like so .htaccess :
2006 Nov 04
2
how to use LabellingFormBuilder
Railsers: As usual for a product written very rapidly, most of its documentation assumes some other documentation told you something critical. For example, the file form_helper.rb tempts me with this documentation: # <% form_for :person, @person, :url => { :action => "update" }, :builder => LabellingFormBuilder do |f| %> That''s beautiful. Now what do I
2005 Nov 15
2
FormOptionsHelper select call failing
In Rails 0.14.3, I''m doing the following in a view: <%= select ''folder'', ''format'', [''a'', ''b'', ''c''] %> This line in is failing with: ActionView::TemplateError (too few arguments.) Am I calling select incorrectly? (Yes, the @folder object does exist, and does have an attribute
2015 Nov 19
1
[PATCH] Refactor checksize.pl
Le Jeudi 19 novembre 2015 18h43, Celelibi <celelibi at gmail.com> a ?crit : 2015-11-19 17:30 UTC+01:00, Nicolas Cornu via Syslinux <syslinux at zytor.com>: > - Remove padsize argument as it is never used. > - Add an usage printed when $file is not set or --help, -h > is the first argument. > - Add basic tests for this script. > --- > mbr/checksize.pl | 27
2015 Nov 19
0
[PATCH] Refactor checksize.pl
2015-11-19 17:30 UTC+01:00, Nicolas Cornu via Syslinux <syslinux at zytor.com>: > - Remove padsize argument as it is never used. > - Add an usage printed when $file is not set or --help, -h > is the first argument. > - Add basic tests for this script. > --- > mbr/checksize.pl | 27 ++++++++++++++++++--------- > mbr/checksize_test.sh | 22 ++++++++++++++++++++++
2015 Nov 19
3
[PATCH] Refactor checksize.pl
- Remove padsize argument as it is never used. - Add an usage printed when $file is not set or --help, -h is the first argument. - Add basic tests for this script. --- mbr/checksize.pl | 27 ++++++++++++++++++--------- mbr/checksize_test.sh | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 mbr/checksize_test.sh diff --git a/mbr/checksize.pl
2006 Mar 17
1
edge - scaffolds now pluralized?
Are my eyes going buggy, or did something recently change in Edge Rails so that now scaffolds are generated with pluralized controller/ helper/etc names? I peeked at the code in railties/lib/rails_generator/generators/components/scaffold/ scaffold_generator.rb around line 50, and it looks like there was a change there recently so that it now defaults to pluralized names. So why was this
2010 Nov 11
8
zpool import panics
Hi, I just had my Dell R610 reboot with a kernel panic when I threw a couple of zfs clone commands in the terminal at it. Now, after the system had rebooted zfs will not import my pool anylonger and instead the kernel will panic again. I have had the same symptom on my other host, for which this one is basically the backup, so this one is my last line if defense. I tried to run zdb -e
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in the browser. <h1>New member</h1> <%= error_messages_for :member %> <% form_for(:member, :url => members_path) do |f| %> <fieldset> <legend>Member Info</legend> <p><label for="member[first_name]">First Name:</label> <%=
2011 Jan 05
0
Nnet and AIC: selection of a parsimonious parameterisation
Hi All, I am trying to use a neural network for my work, but I am not sure about my approach to select a parsimonious model. In R with nnet, the IAC has not been defined for a feed-forward neural network with a single hidden layer. Is this because it does not make sens mathematically in this case? For example, is this pseudo code sensible? Thanks in advance for your help. I am sorry if this
2008 Dec 20
3
undefined method `stories_path'
Hi, I recieve error "undefined method `stories_path'' for #<ActionView::Base:0x995b4ac>" when going to the view via site.com/stories/new The model is setup correctly, I can retrieve data from the db fine. I think it might be related to the helper but I have no idea where to start. It seems to think its failing on the first line of the view, i belive on the
2006 Aug 07
0
ROR Architecture question
Hi everyone, I am creating a typical client management app for a small office. The only twist is that I want the ''admin'' to be able to add custom form fields into the client forms. Is there anything out there that will let me create custom fields on the fly? I''d like to see how they did it. Or if anyone has any tips as to how I should design this, please go