routes

Backbone Router Ignoring search route

南楼画角 提交于 2019-12-08 07:20:56
问题 In need of some help! I'm trying to get my Backbone router to match this route: http://localhost:5150/search_results?utf8=%E2%9C%93&keywords=&location=Norfolk%2C+VA&commit=Search ..And nothing is working. Very frustrating! This is my first try at Backbone, so advice would be awesome. '/search_results?*': 'search_results' # NOPE '/search_results?foo=:foo': 'search_results' # NOPE '/search_results?foo*': 'search_results' # NOPE '/search_results?*queryString': 'search_results' # NOPE 'search

Rails 3.2, No Route Matches { :controller=>'xxx' :action=>'xxx" }

旧时模样 提交于 2019-12-08 07:04:40
问题 I'm trying to edit multiple records with a checkbox form as shown in this Railscast. Rails has changed since then and I'm having trouble with routing and forms. I have a PeopleController and I'm trying to make a form that will edit all of their phone numbers at once. Yes, I know this isn't a useful function, as there is normally no reason to change everyone's phone numbers to the same thing, but I'm just using this to get comfortable with the code - and it isn't working! Here's what I've got:

Laravel get routes work, post don't

懵懂的女人 提交于 2019-12-08 06:51:10
问题 I just can't figure it out, why on my local environment the following routes work perfectly.... and on a Staging environment I have been provided, to test the code, it doesn't work as supposed to Routes: Route::controller(Controller::detect()); ... Route::get('api', array( 'as' => 'api_index', 'uses' => 'api@index', )); Route::get('api/(:any)/(:any)', 'api.(:1)@(:2)'); Route::post('api/(:any)/(:any)', 'api.(:1)@(:2)'); Route::put('api/(:any)/(:any)', 'api.(:1)@(:2)'); Route::delete('api/(:any

Different routes but using the same controller for model subclasses in Rails

爷,独闯天下 提交于 2019-12-08 06:40:54
问题 I have a Model Property which has subclasses using STI, and which I would like all to use the same controller with only different view partials depending on the subclass. Property Restaurant < Property Landmark < Property It works find except I'm not sure how to discern the subclass inside the controller to render the correct view. Ie. /restaurants works and goes to the properties controller but I can't tell that they want the Restaurant subclass? map.resources :restaurant, :controller =>

no route matches leading to ActionController UrlGenerationError

只愿长相守 提交于 2019-12-08 06:30:26
问题 I have created a ToDoList based off Hartl's tutorial, and following a video and worded tutorial to add a tagging system. I have followed till Section 10, where they asked me to modify my new.html.erb file to the code as shown on the source. To improvise for structural differences in code, I would edit some other files, like in this case, my micropost_form partial instead. Occasionally, I alternated between the code in the video and code in the worded tutorial because some of them would

ruby on rails - routes.rb - match file extension when multiple periods exist in filename

巧了我就是萌 提交于 2019-12-08 06:20:34
问题 I have created a route plus controller for doing dynamic css in ruby on rails as per the instructions here: http://www.misuse.org/science/2006/09/26/dynamic-css-in-ruby-on-rails/ It took some changing to account for a newer version of ruby on rails, but the problem comes in with the routes.rb entry. The original entry was this: # dynamic CSS (stylesheets) map.connect 'rcss/:rcssfile', :controller => 'rcss', :action => 'rcss' This did not work with a newer version of RoR, and I found this

Play 2.0.4 Catch-all route always hits

五迷三道 提交于 2019-12-08 06:05:27
问题 At the end of my routes file I put a catch-all route to catch requests which wasn't catch previously and pass it to my own router (for further processing): GET /*nameUrl controllers.Application.router(nameUrl: String) of course there are many other routes BEFORE that line. The big surprise for me is that the catch-all is hitten every time, even if previous route is hitten as well, so if I'm opening address domain.tld/test it displays me both logs in the console Test action hit! AND Custom

Getting local UDP server information into c++

試著忘記壹切 提交于 2019-12-08 05:41:44
问题 So, I got this program running on my mac, ipMidi, that allows me to send midi events through my ethernet connection. It works under UDP protocol and is sending midi from my Ableton Live daw. I'm trying to read, in the same machine that is running ipMidi, the packages from ipMidi into my C++ program, but I can't figure out how to do this. I've been doing research for some time know and I just can't figure out how to get the ipMidi to send the packages to my local host or to sniff the packages

Laravel get routes work, post don't

≡放荡痞女 提交于 2019-12-08 05:17:27
I just can't figure it out, why on my local environment the following routes work perfectly.... and on a Staging environment I have been provided, to test the code, it doesn't work as supposed to Routes: Route::controller(Controller::detect()); ... Route::get('api', array( 'as' => 'api_index', 'uses' => 'api@index', )); Route::get('api/(:any)/(:any)', 'api.(:1)@(:2)'); Route::post('api/(:any)/(:any)', 'api.(:1)@(:2)'); Route::put('api/(:any)/(:any)', 'api.(:1)@(:2)'); Route::delete('api/(:any)/(:any)', 'api.(:1)@(:2)'); The problem stands at my post requests, as they just won't be found and

Laravel request HTTP if HTTPS activated

半世苍凉 提交于 2019-12-08 04:07:04
问题 So I am having an issue where on most pages we need the user to be on SSL. So we have the following code with a route to force a user to go into SSL mode. //secure app route Route::filter('force.ssl', function() { if( ! Request::secure()) { return Redirect::secure(Request::path()); } }); This works perfectly however on two specific pages the user HAS to be in http mode (issue with external server not accepting https requests). How can this same logic be applied in reverse? I assume something