Hi, On Fri, Jan 22, 2016, at 19:20, fugee ohu wrote: > On Friday, January 22, 2016 at 5:16:55 AM UTC-5, Colin Law wrote: > > > > On 22 January 2016 at 04:16, fugee ohu <fuge...@gmail.com <javascript:>> > > wrote: > > > This form raises undefined method `pictures_path' for > > > #<#<Class:0xaea3ad0>:0xbb9cb4c> > > > > > > <%= form_for(@picture, :html => { :multipart => true }) do |f| %> > > > > Have you defined that route in routes.rb (via resources: pictures for > > example)? > > > > I agree with Przemek that you would probably be better off using > > paperclip for uploading. It makes life very easy. > > > > Colin > > > > I wouldn't disagree Here's the route: post > 'users/:id/profiles/:id/pictures/new' => 'pictures#new' >
That route doesn't add the `pictures_path` named route. Try adding `as: 'pictures'` option. Also note that neither the action name nor route you specified follows rails standard convention[1]. [1] http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1453459150.3567674.499468994.152475FC%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.