On Nov 30, 2009, at 2:33 pm, George wrote:

> def create(thing)
>  @thing = Thing.new(thing)
>  if @thing.save
>    render @thing.id    # ==> nil
>  end
> end

Hi George

Is this Rails?  If so, I'm not sure if Rails' render method is designed to be 
used this way.  Haven't used Rails for a while, but I found a page[1] that 
implies you need to do `render :text => @thing.id.to_s`.

Does that help?

Ashley

[1] http://www.rubyonrailsexamples.com/rails-tips/rails-render/

-- 
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran

--

You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.


Reply via email to