ActionController::MethodNotAllowed

Hello All,

I m trying to use a form on my website to send an email. So my form
goes like this :

<% form_tag("/emailfeeder/create", :method => :post) do %>


To:
<%= text_field_tag “recepient”,
@recepient.to_s, :disabled => true %>


Your N.:
<%= text_field_tag :name, @name, :class =>
“textedit” %>
… … …

And route.rb like this :
map.resources :emailfeeder
map.connect ‘emailfeeder/new’, :controller => ‘emailfeeder’, :action
=> ‘new’
map.connect ‘emailfeeder/create’, :controller =>
‘emailfeeder’, :action => ‘create’, :method => :post
I also tried :
map.with_options :controller => ‘emailfeeder’ do |emailfeeder|
emailfeeder.new ‘/emailfeeder/new’, :action => ‘new’, :conditions
=> { :method => :get }
emailfeeder.create ‘/emailfeeder/create’, :action =>
‘create’, :conditions => { :method => :post }
end

I can t really figure out why I m still having this error :

ActionController::MethodNotAllowed

Only post requests are allowed.

Can someone help with this issue please.

Thanks in advance,

Regards,

Joel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs