similar to: the parameter is nil ?

Displaying 20 results from an estimated 9000 matches similar to: "the parameter is nil ?"

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
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 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
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| %> <%=
2007 Oct 23
0
Noob Question: Problems with FormOptionsHelpers
Hi! I have problems to see existing values in several FormOptionsHelpers.. (text_area or select for example): <% @models.each do |model| %> <% form_for "model", model, :url => { :action => :update } do |f| %> <%= f.text_field :name %> // works <%= text_area "model", "text" %> // doesn''t work... <%= select
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/>
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
2012 Feb 07
2
save method (create action) saves twice
Rails 3.1.3 I have changed a regular scaffold action a bit so that it can save using ajax. All I needed to do was adding ":remote => true" in <div id="script_new"> <%= form_for script, :remote => true do |f| %> <!-- HERE!!! --> <%= f.hidden_field :video_id %> <%= f.text_field :text %> <%= f.submit "save" %>
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
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 =>
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/> <%=
2006 May 24
0
Problems validating form with collection_select
I have the following models: class Comandancia < ActiveRecord::Base has_many :elementos end class Elemento < ActiveRecord::Base belongs_to :comandancia validates_presence_of :nombre, :apellido_paterno, :apellido_materno, :comandancia end In the view for New Elemento I''m using <%= start_form_tag :action => ''create'' %> <%= render :partial =>
2009 Jan 18
2
InvalidAuthenticityToken error with remote_form_for
Hi All - I have a form_for that I''m trying to convert to remote_form_for, and I keep get this error: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/request_forgery_protection.rb:86:in `verify_authenticity_token''
2008 Sep 09
2
form_for submit to a custom action
hi forum, I am new to rails, and i am just getting my hang of things. Problem, how do you pass content captured in a form to a custom method? I have the following form: <% form_for :message, @message, :url => { :action => ''reply''} do |f| %> <table cellpadding="4" cellspacing="5"> <tr> <td>Content:<%=
2010 Sep 21
0
Upload form with uploadify jquery plugin
I would like to integrate the uploadify plugin with a standard rails form. However I can''t figure out how to add a new field and have it get submitted with the file upload. I added a name field into the form, but the valued does not get submitted. <% dialog_file_description = ''Photos'' allowed_extensions = [:jpg, :jpeg, :gif, :png] max_size = 20.megabyte
2006 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a couple days and can''t seem to figure out the correct way to structure my observe_field call. The HTML and Javascript generated all appear correct, but the AJAX call is never made. Below is the code I''m using and any help would be much appreciated. models_controller.rb def
2006 Jun 20
0
No opening form tag in rendered HTML
I cannot get my form to submit for my simple blog site (based on the "How to Build a Blog Engine in 15 Minutes" presentation) Any ideas? Thanks, Tom ---------------------------------------------------------------------------- Here is my code: #Post controller class PostsController < ApplicationController def index list render :action => ''list'' end
2008 May 09
0
NoMethodError in ClassifiedController#update
My project was working when I add new field category It is showing the error in create form and edit form i am sending u controller file as attechment this is my model(category.rb) dor category file class Category < ActiveRecord::Base has_many :classifieds end and this is edit.rhtml <h1>Editing Classified: <%= @classified.title -%></h1> <%= form_tag :action =>
2010 Feb 23
11
Couldn't find without an ID
Hello all. I''m new to RoR. I am having trouble trying to get a simple edit/update going. Everytime I hit submit, I get the following error: +++++++++++++++++++++ Couldn''t find Content without an ID Request Parameters: {"format"=>"#<content:0x4d3daac>", "commit"=>"Update", "_method"=>"put",
2012 Feb 17
5
undefined method `key?' for nil:NilClass PaperClip
Hello, I have a problem with the paperclip, I put on my GemFile gem "paperclip", "~> 2.6.0" I create a migrate class FileUpload < ActiveRecord::Migration def up change_table :projects do |t| t.has_attached_file :image end end def down drop_attached_file :projects, :image end end on my model I put class Project < ActiveRecord::Base