similar to: [PATCH] form_for without :html and with :remote causes an error

Displaying 20 results from an estimated 10000 matches similar to: "[PATCH] form_for without :html and with :remote causes an error"

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
2009 Feb 26
0
Using form_for and has_many associations with a controller in its own subdirectory
Hi, I''m trying to create a Blog in it''s own subdirectory for an E-commerce site. Everything is hooked up just fine for the basic posting, but when I try to add Comments, I''m getting all sorts of headaches! I''m referring to the screencast by Ryan Bates on the rubyonrails.org site. Basically, my controller is Blog::Comments, in my Blog::Post comment form I have
2010 Sep 23
1
Patch to fix docs for auto_link
Hi I''ve contributed a patch which fixes an incorrect example in the documentation for auto_link in ActionView::Helpers::TextHelper. The example uses truncate in the old style of tuncate(text, length) which no longer works, so I''ve patched it to use the new tuncate(text, :length => n) style.
2008 May 12
0
Problems with form_for, STI, and polymorphic routing
I''m stumped on how to get past this. It''s Rails 2.0.2. I have a class, Show. Using STI, I''m using that as a base class, and have DayShow and NightShow that inherit from it. ### class Show < ActiveRecord::Base end class DayShow < Show end ### In my shows/edit.html.erb, I have: <% form_for(@show) do |f| %> However, when I use it with a @show that has
2010 Jun 18
1
[PATCH] option_groups_from_collection_for_select should produce an HTML-safe string
Can somebody please review my ticket: https://rails.lighthouseapp.com/projects/8994/tickets/4879 It''s a trivial bugfix ("option_groups_from_collection_for_select should produce an HTML-safe string") before RC, I think. Cheers, Wincent -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group,
2009 Aug 11
5
Dynamic drop-downs in a form_for using AJAX remote_function - Help
Hello - I am fairly new to Ruby on Rails, but feel like I am learning quick. I have what seems to be a fairly unique issue as I cannot find much out there that describes what I''m seeing. Hopefully it''s a very simple fix, and I simply can''t see the forest through all the trees! I am attempting to create 2 related drop-down lists in the same form_for, both using
2009 Oct 28
6
undefined method `^' for "e":String
I''m attempting to learn Ruby on Rails, but these errors aren''t helping. I''m currently trying to follow the lessons available on www.learningrails.com. I received this error after trying to visit a page generated by using the scaffold command. Actually, this is all I did up until the error: rails sample2 -d mysql mysqladmin -u root -p create sample2_development ruby
2008 Dec 02
1
form_for with partial using do |@f|
Is it possible to pass this FormBuilder object to a controller and then back to a partial? I have a form rendering a partial that i would like to update with a call to my controller based on user selectable parameters, but when the AJAX comes back, i get this error message because i cannot pass a form builder object between the controller and the view: "undefined method
2010 Jun 09
1
[patch] fix bytesize in exception template; multibyte titleize
Hi all, I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1: * Use String#bytesize rather than String#length in exception templates: This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.
2010 Apr 18
1
Add shorthand support for routes like /projects/status(.:format)
Hi, when trying to migrate Signal to Rails 3 I tried to use the shorthand route for: match ''/projects/status(.:format)'' but it thrown an error because the controller was not specified. This happend because actually the shorthand routes only work with routes without optional parameters. The modification to support routes ending with a optional parameters is very simple, as can
2006 Jul 26
1
Netjotter application release
I have recently completed an application for storing notes online. It works much the same way GMail does. It is meant as a replacement for using Gmail drafts since there are a few bugs with that method. The application can be found at www.netjotter.com Please let me know if you find any bugs or have any feature suggestions. David Genord II
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 Mar 15
2
simply_helpful's form_for not respecting default_url_options (only_path)
Looking over the discussions and Trac tickets am I correct in assuming that the simply_helpful''s form_for not respecting the default_url_options (specifically only_path) is a side-effect of some other default behavior choices? Personally, I set only_path to true as my default as I think except were you are dealing with https it makes life much easier (especially in testing) and is just
2010 Dec 07
0
A couple of patches
I''ve submitted a couple of patches in Ligththouse. Provide NoStore implementation of ActiveSupport::Cache::Store This patch provides a NoStore implementation of ActiveSupport::Cache::Store suitable for use in development and test environments where the code need to use the cache interface, but actually caching data is not desired.
2006 Aug 11
2
Accessing belongs_to objects from a form_for context
In a form_for context, is there a way to access objects that are related to the primary object with a belongs_to? I think an example will serve best: class User < ActiveRecord::Base belongs_to :person attr_accessor :username end class Person < ActiveRecord::Base has_one :user attr_accessor :first_name end <% form_for :user do |form| %> <%= form.text_field
2010 Apr 05
2
Harmonizing JSON/XML serialization
The way Rails handles root nodes in JSON and XML serialization is inconsistent. This has been discussed before: https://rails.lighthouseapp.com/projects/8994/tickets/2584-232-activeresource-json-doesnt-send-parameters-with-root-node This seems mostly taken care of with ActiveModel::Base.include_root_in_json, especially if/when it ends up in ActiveResource. However, there is also the issue of how
2006 Jun 02
1
form_for scope issue
Hi, I am just ran into the problem that I cannot access helper methods from within a form_for scope. I do have something like the following: <% form_for :potential_buyer, @potential_buyer, :url => { :action => "register" } do |f| %> <%= render(:partial => ''register_form'', :locals => { :f => f } ) %> <% end %> ----- I cannot
2006 Apr 15
0
form_for, partials, and rjs
Hi there! Im trying to use rjs templates to add form fields to an existing form. So for example a user could fill out a form and optionally hit a link_to_remote and get another set of identical fields to fill before sending. This would mean he/she could add ex. more than one record in the same form. The original form was rendered with form_for and using a partial: <% form_for :example,
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|
2010 Mar 24
0
form_for with nested shallow route
Let''s say I have: map.resources :teams do |team| team.resources :squads, :shallow => true end When I want to generate a form_for a squad, I need both the team and squad for new/create, but only the squad for edit. This means I need: edit: form_for(squad) new: form_for([team, squad]) This seems not very dry. Is there a more idiomatic way of doing this? Right now,