similar to: scaffolding issue

Displaying 20 results from an estimated 300 matches similar to: "scaffolding issue"

2005 Dec 01
0
Problem using a date helper
Hi, I''m having trouble getting a date helper working. I was pointed to this by Sean Allen, and it resides at http://theredheadedstepchild.net/articles/2005/08/04/datehelper-fixes It''s meant to fix the bug in Rails which doesn''t allow datetime_select to properly discard the year. So, I''m trying to use the helper''s time_select function. date_helper.rb
2005 Nov 04
0
RE: Why class InstanceTag is defined at 4 different places inRails
In Ruby you can add and modify existing classes at will simply by reopening it. The 4 files you mention add functionalities to the InstanceTag class. This is not a redefinition. The best part is that you can do the same ! An easy way to overwrite an existing method or to add new ones is to create a file under you rails application lib directory and put in it the replacement you want to make:
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:
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks, I think I should start a new thread for this, because a similar one I saw is a bit old and the resolution there doesn''t seem to apply to what I''m running into now. Anyway, my date_select calls are bombing on me with the exception: ---- ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #8 of entries/_dates_form.haml: 8: = date_select(
2006 May 03
2
Using a helper within another helper?
I am trying to push some view logic into a helper. The thought is that this is a step towards having the business logic in the helper rather than the view. However, I''m essentially wrapping the checks around an eventual call to date_select(). The problem I''m having is that the application complains that it doesn''t know about date_select(). I''m sure (or
2006 Mar 15
1
Strange behaviour of dates
Imagine a crud app that tracks people applying for a loan, here is the layout I have: Mysql database: create table apps ( id int auto_increment primary key, primary_id int not null, secondary_id int null, constraint fk_primary_id foreign key(primary_id) references (contacts.id), constraint fk_secondary_id foreign key(secondary_id) references (contacts.id)) create table contacts ( Id int
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a behavior similar to what you get using date_select with the :include_blank => true option where the first value in the dropdown is "- Month -", "- Day -", or "- Year -" rather than a blank value for the respective month, day, and year select fields. I took a look at the ruby source for
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
2007 Feb 21
2
date helper bug?
I''ve found an issue when trying to use the time_ago_in_words and distance_of_time_in_words from action view''s date_helper.rb Using SQL Server, I have a datetime column that gets returned as: "2007/02/21 09:54:00". When I pass this to time_ago_in_words (which just passes on to distance_of_time_in_words) it miscalculates the difference as "9 hours" (...um yeah,
2001 Feb 16
2
Serial Port Access
Hi,. I have some legacy applications for MSDOS / 95 and a new NT version of an application that i would like to use. I have un-commented the lines in wine.conf about serial access but i cant seem to get any MSDOS or win32 application to talk, is this currently supported in (the lateset) wine ? regards --- Matthew J Fletcher NPD Firmware When did ignorance become a point of view ? ---
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
2006 Jul 13
3
date_helper megapatch and MultiparameterAssignmentErrors
Hello all, There''s a great patch in trac that fixes a lof of issues with the date helpers. I''m afraid it hasn''t had any attention yet. http://dev.rubyonrails.org/ticket/3811 This fixes all the little date_helper problems, except one: When you choose an invalid date ActiveRecord throws an ActiveRecord::MultiparameterAssignmentErrors. This used to work in 1.0,
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> <%=
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
2007 Dec 01
3
Rails 2 problem with compute_public_path
I''m trying to migrate to Rails 2, but keep getting these errors all over the place: ActionView::TemplateError: wrong number of arguments (2 for 3) On line #61 of users/new.rhtml 58: <% if @captcha_error -%><div class="fieldWithErrors">< % end -%> 59: <table class="signup"><tr> 60: <td
2006 Mar 10
14
Oracle Date type errors rails on edit
I have a table with "expires_on" a DATE field. "Show" and "Destroy" work, but "Edit" errors: /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:150:in `select_hour'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:149:in `select_hour'' It only happens when
2006 Dec 18
1
Bad merge of r5686 from trunk to 1.2-pre-release?
I do not closely follow the core source commits, but please bare with me. I will keep it short. Recently, changeset#5685 [1] caught my attention as I''ve been waiting for some date_helper love for a VERY long time. What bothered me is that when this changeset was merged into the 1.2- pre-release branch (at changeset#5686 [2]) a change to caching.rb crept in [3], which was not in