search for: form_helpers

Displaying 20 results from an estimated 50 matches for "form_helpers".

Did you mean: form_helper
2006 Jul 16
7
form_helpers ?
Just a quick silly question , are form_helpers actually helper.rb files ? Stuart
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 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
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 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
2007 Jan 12
9
Nil object in E1 capture the order
I''m following the depot application in the rails bible Agile Web Development with Rails. In interation E1 NoMethodError in Admin#checkout Showing app/views/admin/checkout.rhtml where line #12 raised: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.include? Extracted source (around line #12):
2009 Nov 18
4
rails newbie : routing error
After much ado about the naming of model adn controllers... model : Expense controller : Expenses route : map.resources :expenses Here I am using mysql database and created a unique index, since db:migrated created an id object and made it as primary key. Now in the def create @expense = Expense.new(params[:expense]) if @expense.save flash[:viola] = ''New expense saved.. be
2009 Dec 24
4
NoMethodError
Hi, In a few words, can someone explain to me the NoMethodError. Googling for answers will get you to something but a direct answer from experts will give you something. NoMethodError in Book#new Showing app/views/book/new.html.erb where line #4 raised: undefined method `title'' for #<Book id: nil, created_at: nil, updated_at: nil> Extracted source (around line #4): 1:
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> <%=
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 :
2008 Feb 05
1
Unknown method error with control_for
Is there a trick to using control_for in forms? I''ve been trying to make a simple form with a couple of text fields and I keep getting a unknown method error. Thanks!
2006 Jun 02
3
Advice, why value_before_type_cast in FormHelper?
I am wondering why is in creating text fields with form_helper used value_before_type_cast instead of attribute value for field value? I set rails enviroment so date fields are in european format (dd.mm.yyyy) and would like to have same format in forms, but because of value_before_type_cast is called, form fields are filled with ''yyyy-mm-dd'' or timestamp integer, etc.
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
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 Mar 22
4
Newbie - populating select list from db
Can''t seem to find an example of this anywhere - how do I populate a select list in a form from a database? I have a form to create a new task. The task is for a client, so there should be a select list populated from my clients table. I thought this would work: <%= select ''task'', ''client_id'', Client.find_all, "id", "name"
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
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All, I''m trying to do a simple form_for (and I also get it with form_tag) and I''m getting the following error: ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) on line #2 of users/new.fbml.erb: 1: <h1>Welcome To Courses, Let''s Get
2007 Dec 07
4
strange error on mock proxy
I''m banging my head over this really strange error in a view test when I run "rake spec". The weird thing is that I don''t get the error when I run the spec file by itself. Here is the spec (I know, fixtures are the devil): describe "/units/new.html.erb here" do fixtures :units, :accounts, :groups it_should_behave_like
2009 Jan 27
2
Login form_tag with select_tag option
Hi all, In the application i develop, a sophisticated login system is required. Being a newbie in Ruby, i''m not comfortable with the select tag in the form tag. My requirement: 2 tables - User(LoginName, Password, RoleId...) and Role(RoleId, RoleName...) View - RoleNames to be loaded in the drop down box and On submit, RoleId to be passed to controller for authentication. My Code
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