In Rails 3, using Formtastic and Devise, generic routes producing errors when adding a new entry for a model?

Chris, try putting the declaration of the form like this.

Up vote 1 down vote favorite share g+ share fb share tw.

I have a very simple rails 3 program with 2 models: a user model for Devise and a writing model that captures a text field and the user's id. My routes file is pretty basic: devise_for :users resources :users, :writings root :to => "users#index" And my form for writings, using Formtastic, is as well: {:method => :put}) do |f| %> current_user, :as => :hidden %> When I try to create a new writing, the form looks great, but then when I hit submit, I get the following error: No route matches "/writings" I've run rake routes, and everything else seems to be working on, and I am using the default generate scaffold from rails, so the controller is the out of the box controller. Any ideas on where I went astray?

Ruby-on-rails-3 routes devise formtastic link|improve this question asked Mar 7 '11 at 16:33Chris657.

– Augusto Mar 7 '11 at 16:39 @Augusto, you should put this comment as an actual answer because I'm fairly sure it will solve the problem – stephenmurdoch Mar 7 '11 at 16:45.

Chris, try putting the declaration of the form like this current_user, :as => :hidden %> I've the idea that when you specify the :html parameter, you "override" some defaults in formtastic. Sorry, I'm not an expert on formtastic. I've used a bit and then decided to go for simple_form :).

That fixed the problem exactly. Thanks so much! – Chris Mar 7 '11 at 16:58.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions