Routes do not belong to a model, they map request pathes to actions in controllers, so can you please go into a little bit more detail?
--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8797c104-ccef-4b5d-ac5c-cf5b1ae0c2ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<%= simple_form_for @gallery do |f| %>
<% if @gallery.errors.any? %>
<div id="error_explanation">
<h2>
<%= "#{pluralize(@gallery.errors.count, "error")} prohibited this image from being saved:" %>
</h2>
<ul>
<% @gallerys.errors.full_messages.each do |msg| %>
<li>
<%= msg %>
</li>
<% end %>
</ul>
</div>
<% end %>
this is the error i'm getting...
NoMethodError in Gallery#new
Showing /Users/joeguerra/RubymineProjects/portfolio/app/views/gallery/_form.html.erb where line #12 raised:
undefined method `galleries_path' for #<#<Class:0x007feecb78ac50>:0x007feec7571aa8> Did you mean? gallery_path
Extracted source (around line #12):
10 11 12 13 14 15 </style><%= simple_form_for @gallery do |f| %><% if @gallery.errors.any? %><div id="error_explanation"><h2>Trace of template inclusion: app/views/gallery/new.html.erb
I'm using... in my routes file.
get resources :gallery
Thanks,
Joe
On 12 September 2017 at 15:15, Joe Guerra <JGu...@jginfosys.com> wrote:
> RIght, I tried resources galleries, resources gallerys
>
> But all come up with other errors. My post controller and views work, this
> gallery controller seems to look the same? (I don't get it).
rails routes
will show you all configured routes, which may help
Colin
>
> Thanks,
> Joe
>
> On Tuesday, September 12, 2017 at 3:45:29 AM UTC-4, Norbert Melzer wrote:
>>
>> Am 12.09.2017 um 03:15 schrieb Joe Guerra:
>> > get resources :gallery
>> You do have this in your routesfile literally? Seems invalid for me.
>>
>> Also As far as I can remember the convention, `resources` needs the
>> plural name, not the singular name. But I haven't used rails since about
>> 3.x-ish.
>>
> --
> 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+unsubscribe@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/7846a77e-4bb0-42d0-aab8-f087843a30b2%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@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/CAL%3D0gLsF-rFqJpw_EOcrjsmpjCsPWO3WfvmGq71mA35b9_e4Yw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/90a4bc9f-950c-4ac0-8234-17cb58da2371%40googlegroups.com.
On 2017-Sep-12, at 17:29 , Joe Guerra <JGu...@jginfosys.com> wrote:
here's the output of my routes... (sorry about the formatting)Prefix Verb URI Pattern Controller#Action
gallery_index GET /gallery(.:format) gallery#indexPOST /gallery(.:format) gallery#createnew_gallery GET /gallery/new(.:format) gallery#newedit_gallery GET /gallery/:id/edit(.:format) gallery#editgallery GET /gallery/:id(.:format) gallery#showPATCH /gallery/:id(.:format) gallery#updatePUT /gallery/:id(.:format) gallery#updateDELETE /gallery/:id(.:format) gallery#destroy
On Tuesday, September 12, 2017 at 5:03:56 PM UTC-4, Colin Law wrote:On 12 September 2017 at 02:15, Joe Guerra <JGu...@jginfosys.com> wrote:
> ...
> I'm using... in my routes file.
>
> get resources :gallery
Why is the 'get' there?
Colin
--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/af2a8305-0b83-4075-8b51-f0b610ac31a7%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/af2a8305-0b83-4075-8b51-f0b610ac31a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@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/9D2B37D1-18F3-4FC0-9E65-31E73C9DB0D1%40gmail.com.
Thanks. What should I do to fix it? Should I re-run the generator?
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOFgAMmKeJLm3Oj4Y%2B4AYYDEbSC5xfeYvdjzd8tJPQCzXshK9Q%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/af2a8305-0b83-4075-8b51-f0b610ac31a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9D2B37D1-18F3-4FC0-9E65-31E73C9DB0D1%40gmail.com.
--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.