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
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Mar 26, 2010 at 7:44 AM, Christophe Decaux <christophe.decaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.Copy/paste error, or are you missing an ''='' sign there? #<%= @message.id %> -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks, I''m so stupid... Can''t understand how I missed that Christophe Le 26 mars 2010 à 16:01, Hassan Schroeder a écrit :> On Fri, Mar 26, 2010 at 7:44 AM, Christophe Decaux > <christophe.decaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> 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. > > Copy/paste error, or are you missing an ''='' sign there? > #<%= @message.id %> > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.