Hi there,
I’m kind of a newbie, so pardon me if this is obvious
I’m developing an app that has to accept creation of records from http
requests such as
http://my.domain.com/in/?text=some+text@alias=myName
So I have this route :
map.connect ‘/in’, action: ‘incoming’
and this action in the controller (mostly borrowed from scaffold)
def incoming
@message = Message.new
@message.text = params[:text]
@message.sender = params[:alias]
respond_to do |format|
if @message.save
format.html # incoming.html.erb
format.xml { render :xml => @message }
end
end
end
and a small view to acknowledge incoming message
incoming.html.erb
Incoming message #<% @message.id %> from <%= @message.sender %>
Problem is I never get back the @message.id.
I always get something like:
Incoming message # from myName
Any thoughts ?
Thanks,
Christophe