Posts by Leandro Falcão • 61 points
4 posts
-
1
votes1
answer74
viewsA: How to create routes, which accepts only allowed values?
You can do it using regular expression, in your case it would look like this: # routes.rb get '/para_:status(/:opcao1)(/:opcao2)', to: 'search#index', as: :search, constraints: { status:…
-
1
votes1
answer1243
viewsA: How to route with optional and ordered parameters in Rails 4?
What you want is to pass parameters via url to the controller. As far as I know, there is no way you can identify parameters via route, this should be dealt with in controller. To make a route of…
-
1
votes2
answers114
viewsA: Error when running implementation test
Dude, run the commands below in sequence bundle install rm -rf .bundle vendor/bundle bundle install --deployment First install Bundle locally, then remove compiled ones, and install Gems in the…
-
0
votes3
answers131
viewsA: Problems with belongs_to when using Ajax in Rails 4
I believe the problem is in your controller. When you refresh, call the show on controller, the @ordem is created, then all information is loaded. After adding the item, you must re-create the…