similar to: Noob Question: Problems with FormOptionsHelpers

Displaying 20 results from an estimated 10000 matches similar to: "Noob Question: Problems with FormOptionsHelpers"

2006 Aug 02
7
form_for not working with Markaby
I''m playing around with Markaby and I decided to write a little blog app. I''m running into issues with forms however. If I use form_for the output of the form gets swallowed. For example: form_for :article, @article do |f| f.text_field :title f.check_box :published f.text_area :description f.text_field :pub_date f.text_area :content end gets rendered as an empty form
2006 Jul 26
2
text_field and date_select in collection
hello, i would like to display a collection of records on one page (e.g. an author record with all his/her books). a record contains a text_area (e.g. a description of the book) and a date_select (e.g. when the book was published). <% for @book in @author.books %> <%= text_area ''book[]'', ''note'' %> <%= datetime_select
2006 Jul 27
2
setting initial text field values in a form
Hi, I am trying to create a basic form in which I want one of the fields initialized before displaying it. My code (in a view) is as follows: <% if ( session[:user_id] != nil ) then logged_in_user = User.find(session[:user_id]) end %> <% form_for :suggestion do |form| %> <label for="suggestion_title">Topic:</label><br/> <%=
2007 Jul 31
0
Edit not working with named routes
HELP! I''m a relatively new rails user and I''m stuck. I''m trying to build a relatively simple blog and I decided that I liked the way named routes look in the code. So I added map.resources :posts to my routes.db file. I then went through and updated my controller to take advantage of the named routes that were generated. I also updated all of my views and everything
2013 Dec 10
2
form_tag + fields_for Rails 4
Hi There, I''m trying to user fields_for inside a form_tag, but i can''t catch it on my controller. I just take some html code off to makes it easy to read my view... i''m using campuses_path(current_church, @campus) instead form_for @campus, because my route is like resources :campuses, :path => ":church/campuses" <%= form_tag
2009 May 19
0
submit_to_remote fails on rails 2.2.2
submit_to_remote fails on rails 2.2.2 and rails 2.3.2 but fully working with 2.0.2 please give me an answer as soon as possible. its very urgent the code is HTML ==== <% form_for :todo, @todo, :url => { :action => "update_todo" } do |f| %> <div> <p> <label>Todo</label> <%=f.text_field :name%> </p> <p>
2008 Jan 11
0
the parameter is nil ?
Hi, I use scaffold to create the task model controller and view, it contains action as "show", "new", "create", etc. Then, I give an "id" parameters to the view - new.rhtml, so the URL could be like "http://localhost:3000/tasks/new/1" , and I wish when I click the create button in "new.rhtml", the following "create"
2006 Mar 22
3
Parent-Child Tables Help
can someone help me with this i have a table cars ( id int model_id int make_id int color_id int description text constraint fk_cars_carmake foreign key(make_id) references carmakes(id), constraint fk_cars_carmodel foreign key(model_id) references carmodels(id), constraint fk_cars_color foreign key(color_id) references colors(id) ) carmakes ( id int carmake varchar ) carmodels ( id
2009 Nov 05
1
tabIndex not working for select or textarea in form_for
Hello all, Maybe this is something easy to solve but I can set all my text_field tabIndex by { :tabIndex => ''2''}. When I try to do the same for the select or the textarea it doesn''t work. Is there something I''m missing? Thank you. John -- Posted via http://www.ruby-forum.com/.
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field = form_for (Clip.new), :html => {:multipart => true} , :remote => true , do |f| = f.hidden_field :user_id, {:value => current_user.id} = f.text_field :name = f.text_area :description = f.file_field :image = f.submit I18n.t(:add) generating the html code <form accept-charset="UTF-8"
2006 Aug 13
3
why do text_fields appear smaller in IE than other browsers?
In testing my application on different browsers, I''ve noticed a few differences:- a password_field :size=>20 is smaller than a text_field :size=>20 on Internet Explorer. They are the same on Firefox and Safari. makes my login box look silly. the same can be seen on the login screen for this forum. the password box is a little shorter on IE6. more annoying however is I have
2010 Feb 26
0
save has-many associations
I have the following association class Document < ActiveRecord::Base has_many :sections has_many :items, :through => :sections end class Section < ActiveRecord::Base belongs_to :document has_many :items end class Item < ActiveRecord::Base belongs_to :section end Here is the sample view for the ''new'' action <% form_for(@document) do |f| %> <%=
2011 Aug 22
0
Paperclip nested resources problem
My models: class Country < ActiveRecord::Base has_many :regions has_many :assets, :dependent => :destroy accepts_nested_attributes_for :assets end class Region < ActiveRecord::Base belongs_to :country has_many :appartments has_many :assets, :dependent => :destroy accepts_nested_attributes_for :assets end class Asset < ActiveRecord::Base belongs_to :region
2011 Apr 30
8
"uninitialized constant PostsController::Post"
This time i read scaffold tutorial very carefully and finally try to generate a form without using the scaffold(just used a controller and view ).what i have done till now ,is as follow.Using rails 3.0.7. "rails generate controller posts index" 1) post_controller.rb class PostsController < ApplicationController def index @post=Post.new
2006 Jan 23
1
learning how models, controllers, and views pass data
As a noob to Rails and web development in general, I think I still need a broader understanding of how Views, Controllers, and Models pass information and variables to each other. I''m creating a site that allows for email campaigns. I have a ''create_email_controller'': class Admin::CreateEmailController < Admin::BaseController layout ''admin'' def
2008 Apr 14
2
Problems with nil object
Hi to all. I''ve a very big problem. I know this can seem very loing, but please, try to read it. I have a simply blog, with posts and their comments. I''ve two tables in my db, posts, with post id, text and comments_count to store the number of comments-children of each post (as recomanded to do in AWDWR); and the table comments, with comment id, post_id for the post
2006 Jun 06
1
Getting value of form using Ajax (and problems with Safari)
I have got two forms, the first is a textarea plus a link that activates some javascript to change the form, the second activates some javascript on the onchange event which changes it into a textarea form. This works in Firefox, but not in Safari. Also, I need the value which is selected. I''ve found an example that gives the parameter to the javascript, like this: <input
2006 May 07
2
How to handle MySQL data types SET and ENUM in the application
Hi, I wonder how I should use the SET and ENUM data types in my MySQL database combined with a rails application. This is my current _form.rhtml file for products: ------------------------------------------------------------- <%= error_messages_for ''product'' %> | <!--[form:product]--> <p><label for="product_name">Name</label><br/>
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
2010 Sep 27
6
Rails 3 + jQuery ; How to show error messages
Hi guys, can anyone explain how to show error_messages_on (like back in Rails 2 , without Ajax) fields that didnt'' pass the validation the jquery way. I googled for about 2 hours now and found nothing. Jquery works fine and adds the content to my table, but im totally stuck with the whole error/validation thing. My form looks like this: <%= form_for Translation.new , :remote =>