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 %>
@recepient.to_s, :disabled => true %>
“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