Hello again!

I encountered this problem while trying to solve the issue with rendering partials from within partials (which Ignacio solved elegantly).

At first I thought I just didn't understand what was happening, but now that everything else is working, I had time to look at this and there really is a disconnect between dryml and routes.rb.

It doesn't seem to matter what *method* (e.g. *get*, *put*, *post*,...) I put in the dryml *<a>* tag, the links are only active if the associated entry in routes.rb is set to *get* as in:

  <a action=up" method="post" update="agenda-items"/>
  <a action=up" method="put" update="agenda-items"/>
  <a action=up" method="get" update="agenda-items"/>

all work with

  resources :agenda_items do

    member do

      get 'up'          # this works

      get 'down'        # this works

    end

  end

none work with

  resources :agenda_items do

    member do

      put 'up'          # this doesn't work

      put 'down'        # this doesn't work

    end

  end

or

  resources :agenda_items do

    member do

      post 'up'         # this doesn't work

      post 'down'       # this doesn't work

    end

  end


When I say it doesn't work, the link is not even activated. The generated HTML has no <a> tag, only the associated text/image. I looked at the source for the dryml <a> and it has a specific case for *method != 'get*', but that only seems to invoke some jquery stuff that is not related to the route (I may be wrong in this assumption). The log shows a series of errors when routes.rb does not use *get*. Typical of these is:

recognize_path has failed: No route matches 
"/agenda_items/1-approval-of-last-month-s-minutes/down"


These errors occur once per link whenever the page is refreshed. (The error message would be much more informative if it showed the failing method too).

Since the links/buttons actually modify the data (in this case by re-ordering the table), I would rather use *put* or *post* so that the data are not changed if someone spiders the site.

Any suggestions/ideas?

Thanks,

Don Ziesig


--
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to