Jump to content

The ultimate community for Ruby on Rails developers.


Photo

From server to client to server to client... Phew!


  • Please log in to reply
1 reply to this topic

#1 RensterUK

RensterUK

    Passenger

  • Members
  • 7 posts

Posted 18 March 2014 - 10:20 AM

Hi All,

 

I have a view, which contains 2 select boxes. The left of these is a multi-select, and is populated on load, with a list of files on a remote server (version control system, to be exact).

 

There is a "sync" button on the page. When the user clicks the sync button, then entries selected in the left box should be synchronised from the VCS to a pre-defined folder on the web host.

 

Upon sync completion, (or even, file by file as it goes - although I'm guessing that'd be much harder!) - the right hand list box should be refreshed with the contents of the web host folder.

 

 

I have server side Ruby functionality to fetch from VCS to the web host.

 

I have client side Java functionality to identify the selected items in the left hand list box.

 

 

What I don't have, is the knowledge of how to pass this list back to the server, and initiate the sync from VCS to web host, for the specified files.

 

Can anyone advise the way forward? Can I call a controller method from the view, and pass the java list in? Or do I need to use a POST route? Some other solution?

 

 

Thanks

Steve

 

 

 



#2 RensterUK

RensterUK

    Passenger

  • Members
  • 7 posts

Posted 21 March 2014 - 08:57 AM   Best Answer

Solved! See my other post here for the details:

 

https://railsforum.c...-to-controller/






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users