similar to: Simply Restful: Can''t create update forum

Displaying 20 results from an estimated 5000 matches similar to: "Simply Restful: Can''t create update forum"

2006 Apr 25
7
undefined method form_for ?
Seems the only issues I ever have with Rails are these bizarre fiddly little things that make no sense. Can''t for the life of me understand why I''m getting undefined method on form_for in a view? And it''s actually part of the acts_as_authenticated plugin that''s doing it. But how can it not know about form_for? -- Posted via http://www.ruby-forum.com/.
2008 Jul 11
1
form_tag and hidden text fields
Hello, while designing a form with the form_for tag, I m not being able to hide my text fields. Here is an excerpt of my code : <% form_for :foo, @foo, :url => { :controller=>"foo",:action => "create" } do |f| %> <tr> <td class="col2"><%= f.text_field :user_id, :type => ''hidden'', :value=>current_user.id
2008 Oct 18
5
render :update / page.replace_html problem
Hi there, I have this ajax problem, I''m desparately trying to debug since 1 entire day now: The Controller includes: ======================== [...] render :update do |page| page.replace_html ''coverletter_part'', :partial => ''user/applicationfiles/coverletter_part'' end [...] The View includes: ================== [...] <div
2010 Mar 06
7
form_for, submit, and parameters disappearing
Consider the following: -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
With the help of several heroes here yesterday I beat my way into a working solution to adding comments to one or more models in my application using acts_as_comentable. Great plugin, but my implementation is lame. I need enlightenment. I have users who log in. For several views I want to let them add comments. Enter act_as_commentable which does just this -- it''s polymorphic, so you
2007 Dec 04
7
REST bug with form_for
Hi all, I am running on Windows XP sp2 with ruby 1.8.6, and rails 1.2.3 I am using REST, and have this in my view <% form_for(:project, :url => project_path(:user_id => @project.my_user, :id => @project), :html => {:method => :put}) do |f| %> The browser correctly gives <form method="post" action="/users/2/projects/1">
2008 Jan 14
5
Only "form_tag" support uploading file?
Hi, there: I wanna use plug-in "file_column" to upload image to the server. In my test app, the view is as follow & it works well: ==================== <h1>New entry</h1> <%= error_messages_for ''entry'' %> <% form_tag ''create'', :multipart => true do -%> <p><label
2007 Dec 10
11
map.namespace, rake routes yields no POST URLs
routes.rb map.namespace :admin do |admin| admin.resources :cupcakes end rake routes cupcakes GET /cupcakes formatted_cupcakes GET /cupcakes.:format POST /cupcakes POST /cupcakes.:format That said, what the heck goes here: form_for(:cupcake, @cupcake, xxx_url) # ??? Calling create_admin_cupcake_url yields... undefined local variable
2007 Oct 01
1
form urls and activeresource object
I have an update form that looks like this: <% form_for @article do |f| %> <p> <b>Title</b><br /> <%= f.text_field :title %> </p> <p> <%= f.submit "Update" %> </p> and when I try to update it doesn''t work because it prints this in the html form: <form
2010 May 23
1
[Rails 3] Trouble with named routes and form_for
Hi guys, I''m having trouble getting named routes and form_for to play nicely in quite the way I would expect. Here''s a quick summary of what I''ve got going on: Named route: resources :thread, :class_name => "forum_thread" Controller name: forum_thread_controller Model object: forum_thread In both my new and edit actions I''m setting up an
2006 Oct 13
2
form_for() and name
how can i give name attributes for form_for(), so it will give an output like <form name="f">. it is because that i need to access the form name for javascript manipulation. as far as i know, name can only used in form_tag(), but i currently have more than 50 forms that built using form_for(). the structure is like this: <% form_for symbol, item, :url => { :action
2007 Dec 28
1
Nested resources form_for problem
Hi, I have a resource map like this: map.resources :users do |user| user.resource :sreg10record end So a User is supposed to have (at most) one Sreg10record. The problem is in the views. I tried following this tutorial: http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial which proposes something like: <% form_for( [@user, @sreg10record] ) do |f|
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 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",
2006 Apr 26
2
Retrieving :id without passing it
Ok, I have read most of Agile Web Dev... so I had a question about beautifying URLs using routes.rb. I''m trying to architect a content management system in which a user can create template pages. This way, when a user creates a template page nested within, it displays it as though it''s displaying a folder structure, much like a directory tree (using acts_as_tree). I have a
2009 Aug 04
6
form_for
hi everybody... I have a form_for in that, onclicking submit button i am calling a javascript for validation.If validation fails that form_for doesnt do anything.But even the validation fails it goes to the controller and action. here my code: <%form_for :promotion_code,
2006 Aug 05
1
form_for and partials
I''m getting an error in the partial when i try <% form_for :name do |form| %> <%= render_partial "#{@current_stage}" %> <% end %> So I assume that form_for does not have scope in the partial? If that is the case what are my solutions... Do I have to stick a <% form_for in every partial, or do i just change all my inputs back to text_field
2009 Jul 01
1
form_for resources with :singular specified
I fully suspect that I''m missing the point here somewhere so I promise I won''t be offended if you tell me I''m being daft. My application rents equipment ... not equipments. So I have the following: map.resources :equipment, :singular => :equipment_instance class Equipment < ActiveRecord::Base class EquipmentController < ApplicationController The
2008 Nov 04
3
Nester Resources, Routes and Class Inheritance
Ok here''s a quicky... but a goody :) We have models Company, Reference and Applicant... and References and Applicants just inherit from Company, and are basically companies with the type field set to reference... All companies can have a phone number associated with them, and phone number is a different model... I''m having trouble using the form_for method with a company that
2008 Mar 23
1
Object creation when the controller is a subclass of AdminController
I''ve finally determined that the best way to handle administration of a model that displays publicly but is administered privately is through subclassing but I''ve run in to pathing issues (I think) when trying to create an instance of my model. Let''s say I have a Book, and BookController is a sublcass of AdminController so that I can create and delete Books via an Admin