Questions tagged as 'controller'

2
answers

Form to change variable for a calculation in the same view

I'm starting with Rails. I have a view that receives information from the database and through methods of a model make several calculations. For example: <% @profundidade = 0.5 %> <% @prnt = 90 %> <% @analises.each do |a...
asked by 28.02.2015 / 02:57
1
answer

How to display a user's posts?

I'm trying to display user posts in perfil = link_to 'perfil', user_path(user) The user data appears, but when I try to show user posts the error occurs:    NoMethodError in UsersController # show undefined method 'posts'   for # &l...
asked by 20.01.2015 / 23:03
0
answers

How do I test this Spring MVC method with JUnit? [closed]

Hello, I need help to create a JUnit test class for the Spring method below. @Controller public class ControllerFuncionario { @RequestMapping("/index") public String index(Funcionario funcionario, Project pro, Model model) {...
asked by 24.12.2018 / 13:37
0
answers

I can not pass parameters from view to controller in MVC using URL

I'm doing an MVC project and am not able to pass the Search window parameter to the Controller that is reaching View . I'm going to go through both classes, if you need more information I see editing here: OfficeListing.cshtml @model...
asked by 31.10.2018 / 03:19
1
answer

How to call my Asp.Net MVC view with ajax

I'm starting my studies with Asp.Net MVC and I'm having trouble getting a view from the main menu. I have an initial "_Layout" view with the following menu item: <li> <input type="radio" name="tabs" class="rd_tabs" id="tab3">...
asked by 23.09.2018 / 04:51
0
answers

SyntaxError: expected expression, got '' in AJAX call

Hello I'm having an error in an AJAX call in my JavaScript. For some reason, it does not get to the function in my Controller and gives the following error: SyntaxError: expected expression, got '. This function is called as soon as I cli...
asked by 29.08.2018 / 21:06
0
answers

How to edit the title of ALL alerts in the ionic app, not just one?

Following the ionic documentation, I can edit the title of an alert, using the one taught at the following link: insert the link description here However, when the alert is fired from within an iframe, it is shown as a "natural" android ale...
asked by 12.08.2018 / 16:07
1
answer

How to create a controller with data from another table in ASP.NET?

I'm not sure how to properly create an Employee Controller. The Official class is linked to three others, being CBO, Company and Department. So, in the database schema, they receive these three primary keys. My big problem then is that I'm no...
asked by 14.06.2018 / 09:45
0
answers

Error building controller in Slim framework [Callable App \ Controllers \ HomeController does not exist]

My application in the slim framework is giving error when trying to build a controller ... Details Type: RuntimeException Message: Callable App\Controllers\HomeController does not exist File: D:\xampp\htdocs\projetosWeb\base\vendor\slim\slim...
asked by 09.06.2018 / 08:09
1
answer

Reduce function in the controller laravel

I would like to know if you have how to rewrite the function below in a cleaner way, without so many if / elseif. public function pesquisa(Request $request) { if (! Gate::allows('celular')) { return abort(401);...
asked by 18.05.2018 / 14:24