Questions tagged [controllers]

Controller provides a centralized entry point for handling requests. Usually is referred as a part of Model-View-Controller design pattern.

903 questions
-1
votes
4 answers

Controllers into completely different directory

I'm trying to build an admin panel to my rails application, but want to keep my admin controllers away from my other controllers. Is there anyway I can have a admin folder in my app folder which contains controllers just for admin stuff. Thanks in…
James Blond
  • 9
  • 1
  • 2
-1
votes
2 answers

Angular: Comunicate through controllers and directives

I'm learning Angular, I have a simple directive that render a select. On the ng-change of that select I'm calling a method in the controller of my directive: $scope.changeSelect = function(selectedValue) { …
Pablo
  • 9,424
  • 17
  • 55
  • 78
-1
votes
1 answer

codeigniter how to create multiple controllers

I am new to codeigniter and I want to make my program with multiple controllers. Can someone give me a link or a video link of a tutorial on how to make this possible or can someone here teach me? They always tell me to use h m v c but i don't…
kev_m
  • 325
  • 7
  • 30
-1
votes
1 answer

Yii2: Proper Structuring of Actions based on User Roles

I'm quite worried with the current way I structure actions in my controllers. I'm not sure which is the more adopted method for implementing actions that show different things for different users based on their type. For example: Creating a Model…
TechMafioso
  • 135
  • 4
  • 16
-1
votes
1 answer

Create ViewData outside Controler in MVC

I have a method inside a controller that creates ViewData. For example this one private void CreateFKViewData(OSQDCOL osqdcol, OSADCOL osadcol, IList targetTBLcols) { ... ViewData[osadcol.ColName] = new SelectList(SelectListItems,…
Christoph Adamakis
  • 865
  • 2
  • 9
  • 26
-1
votes
2 answers

Should I use $watch or a large function in my angular controller?

I have a form that submits to a 3rd-party service in order to receive a "token". I can specify a callback function that will handle the response from the 3rd-party service. Ideally, this response will be the token, however it could also be an error…
Daveh0
  • 952
  • 9
  • 33
-1
votes
2 answers

Can you change $_POST into something different

I made two separate databases for my posts, one for article and one for review. My two database tables, are basically the same. CREATE TABLE IF NOT EXISTS `post` ( `post_id` int(11) NOT NULL, `post_title` varchar(25) NOT NULL, `post_text`…
LabKitty
  • 51
  • 1
  • 9
-1
votes
2 answers

Rails 4: nested ressource's plural is an undefined method

I've been working on this issue during the whole week, and despite many blogs that deal with this issue, like this, I'm having an error: undefined method `employeurs'... Let's imagine that you have two specific kinds of users, the employeurs and…
Francky
  • 205
  • 1
  • 10
-1
votes
4 answers

How do I call the SecondViewController on Xcode?

I'm new to programming on Xcode and can't really find out how to call the SecondViewController window by pressing a button. The button is called Ingredients; I tried entering "-(IBAction)Ingredients:(id)sender; in the ViewController.h and but then…
-1
votes
1 answer

Find list of Controllers Name and Actions Name in mvc

i have a navigation page and i wanna that when click on create navigation i show dropdown that include of Controllers name and when choose one controller then in another dropdown show related action so how can i find my controllers name and action ?
epj
  • 11
  • 2
-2
votes
1 answer

Log4j Grails how to configuring controllers at a log level?

What different between org.codehaus.groovy.grails.web.servlet and grails.app.controllers? It seems that both of them can configuring controllers. org.codehaus.groovy.grails.web.servlet not work , grails.app.controllers work ...
-2
votes
1 answer

How to call and HTTP route from express controller?

Hi i need some help for this issue, I need to run: exports.someFunction = function () { // i need call a route like this. app.route('api/getdata'); }; I need call some route in express function. How can I do it?
Hiro Palacios
  • 103
  • 1
  • 1
  • 4
-2
votes
1 answer

In what kinds of situation we are using Random /Random order controller?

In what kinds of situation we are using Random,Random order controller?
Satheesh
  • 87
  • 1
  • 8
-2
votes
1 answer

Syntax error, unexpected ' '. Please, (and no more)

Again, with some of modification "user.php" controller, mysterious error appear: Unhandled Exception Message: syntax error, unexpected '' Please, ... yes, that's all. I only modify user.php; here be gist:…
-2
votes
1 answer

NoMethodError in Characters#new

I am new to Rails.I am creating a Rails project in which Product and Character are the models.I have the following Questions. Q1. Is the given association between the two models is right? class Product < ActiveRecord::Base has_many…
Pavan
  • 33,316
  • 7
  • 50
  • 76
1 2 3
60
61