That's a shame. Seems like 1.0 -> 1.3 would've been the better place to have breaking changes, though maybe spreading the breaks across a couple updates might make it smoother.
If the only downside is that it breaks with previous convention, I'd say let's make the break as otherwise we have to basically duplicate rails efforts in adding equivalent functionality. It's not just the code maintenance cost, it's also documentation and user confusion as there's no indication as to why changing url_for doesn't affect links. On Tuesday, September 4, 2012 1:43:29 PM UTC-6, Bryan Larsen wrote: > > I'm hoping to push the code for this within the next day or two. > > One big side effect of this change is that it messes with named > routes. The new object_url uses polymorphic_url to do all of its > heavy lifting, and polymorphic_url uses named routes behind the > scenes. It assumes that these named routes were generated by Rails > resources mapper. If you were wondering why Hobo 1.3 puts a bunch of > get, put and post statements into hobo_routes.rb rather than a bunch > of resources statements, that's one of the biggest reasons why. Hobo > 1.3 names its routes in a manner compatible with Hobo 1.0. Unless we > decide to back out the object_url changes, Hobo 1.4 will create routes > by using "resources" inside of routes.draw. Some of the named routes > will therefore not have the same names as they would in Hobo 1.3. > For example, if you use the function `create_task_for_story_path` in > your code, you would have to change that to `create_story_tasks_path`. > The controller function will still be names > TasksController#create_for_story, but the named path changes. > > This will break a lot of people's code, but I think that it's a > worthwhile change -- moving forward we do want to remove incompatible > Hoboisms, this being one of them. > > thoughts? > > Bryan > > > > On Tue, Sep 4, 2012 at 3:23 PM, kevinpfromnm > <[email protected]<javascript:>> > wrote: > > Did you end up working this in on 1.4? > > > > > > On Friday, August 10, 2012 10:12:23 AM UTC-6, Bryan Larsen wrote: > >> > >> That's very strange. I just assumed that we were using the Rails > >> routing system to build our paths. In many places we are, but the > >> <a> tag and its helpers build them up as strings, and of course they > >> don't support the host or protocol options. I'm really surprised > >> that nobody has complained about that before. > >> > >> Now I just have to decide whether to refactor object_url to base it on > >> url_for or whether I should just take the easy route and add host & > >> protocol options. > >> > >> Opinions? > >> > >> Is the app you're working on using 1.4? Whatever I do should > >> backport fairly easily, but... > >> > >> Bryan > >> > >> On Thu, Aug 9, 2012 at 8:15 PM, kevinpfromnm <[email protected]> > wrote: > >> > Trying a subdomain enabled site but because most (all?) of the links > >> > aren't > >> > using url_for, the standard rails way of changing how the subdomain > is > >> > used > >> > no longer works. Really have a simple case where I want urls to > >> > redirect > >> > back to the main url when viewing a page through the subdomain, but > >> > either > >> > I'm too tired to be doing this or it's obfuscated in the source. > Either > >> > way, was hoping there'd be a simple one place handles all change to > be > >> > made. > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "Hobo Users" group. > >> > To view this discussion on the web visit > >> > https://groups.google.com/d/msg/hobousers/-/RH1hpKLC-SwJ. > >> > 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/hobousers?hl=en. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Hobo Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/hobousers/-/cnU3EjehXqkJ. > > > > To post to this group, send email to [email protected]<javascript:>. > > > To unsubscribe from this group, send email to > > [email protected] <javascript:>. > > For more options, visit this group at > > http://groups.google.com/group/hobousers?hl=en. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/hobousers/-/nyoNs7_Tx54J. 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/hobousers?hl=en.
