Controller provides a centralized entry point for handling requests. Usually is referred as a part of Model-View-Controller design pattern.
Questions tagged [controllers]
903 questions
0
votes
1 answer
Proper Usage of Rails After_Filter
In a small app I am building, I have a controller that creates an exchange. When a user creates an exchange they are simultaneously the organizer of the exchange and a participant in the exchange. Participants are tracked by a join table that…

VictorO
- 147
- 2
- 8
0
votes
1 answer
attribute values are changing while trying to insert into tables in rails
I am working on a project where there are users and users have profiles. I am using the devise gem for the user authentication purposes.I have changed a path for an action in a controller which is resulting in unexplained…

Sai Suman
- 47
- 7
0
votes
1 answer
Proper way to change a instantiate button in parent view/control
I'm creating a single-page web app that has one controller for the overall page (PageController) and separate child controllers for two views (ViewController and EditController).
ViewController needs a button called "Edit" in the titlebar of the…

Anders Bornholm
- 1,326
- 7
- 18
0
votes
1 answer
What do they utilize to build android apps with custom graphics and controls ?
What I mean to say while you're just getting started with the development and say you add a slider theres a predefined skin for that and you can place it somewhere on the screen, but in some apps there are things like a knob in a place of slider…

Nash Vail
- 848
- 2
- 11
- 27
0
votes
1 answer
storing value in variable
Ok, so I have ?document_key=2343t8ujjf being appended to my redirected url(index of my Partners Controller) after user signs an e-document.
I am storing this into a class variable in the index method. However, I have to use a different method…

myData
- 215
- 1
- 4
- 16
0
votes
3 answers
What would be the best way to simulate the animation on the iPhones home screen?
I have two view controllers and i can manage the right to left animation between them via a custom segue, but what would be the best way to have the incoming VC animate with the finger, kind of like how the home screen on the iphone works?
If this…

Gagan Singh
- 988
- 12
- 22
0
votes
1 answer
What routes to add in routes.rb for a controller create function?
My chap_three_controller.rb file :
class ChapThreeController < ApplicationController
def create
@marker = Marker.new(params[:m])
if @marker.save
res={:success=>true,:content=>"
found #{marker.found}
…

sushmit sarmah
- 7,508
- 6
- 21
- 24
0
votes
3 answers
Rails controller contents into separate configuration file
Does anybody know a good way to separate out a controller item into a separate file? I have the following in of my controller.
def admin?
session[:password] == "password"
end
But I'd like to separate the "password" into a separate file so I can…

calabi
- 283
- 5
- 18
0
votes
1 answer
CakePHP Security Component Can't be Called
Certain pages of my website crash when I try to call the 'Security' component in any of the apps. For example in the AppController file, if I change the components definition from
var $components = array('Auth','Session','Email');
to
var…

Irfan Ali
- 11
- 5
0
votes
1 answer
Laravel 4.0 nested controller
I try to get the nested controller in Laravel 4 based on the following structure:
app
controllers
base
BaseController.php
website
WebsiteController.php
I want to get the website route to be associated with WebsiteController that extend…

Flash-Square
- 391
- 1
- 4
- 10
0
votes
1 answer
Cross controller security in CakePHP
I have the following situation: multiple views use a content editor that can upload files and retrieve a list of previous uploads via AJAX. I end up adding two actions to every controller for this. Instead, I want to have just one common…
user901401
0
votes
1 answer
Why to rails redirects work when redirecting to a route and do not work when redirecting to an action?
I have been struggling with rails double render errors for a few weeks now (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at mos ....etc...).
I figured out that if i have…

doug
- 1,963
- 2
- 16
- 24
0
votes
1 answer
base controller zend framework 2
I wonder if someone here can help, I am just starting with Zend Framework 2 and I am find it slightly daunting to get a project started off properly..
I am trying to create a base controller that I can be extended from. I am currently using the…

user2011139
- 49
- 6
0
votes
1 answer
Creating dynamic property in a object
I used cakePHP which has a nice feature where the model (if present is already created as a property within your controllers, so effectively I would have access to a property named $this->model_name within my controller without having the create an…

mauzilla
- 3,574
- 10
- 50
- 86
0
votes
2 answers
RSpec Controller Testing
I am new to testing with RSpec and I would really appreciate your help.
This is my index action inside the controller and I need to make tests for it to see if the chained selects inside the view are acting as they are supposed to. I would be…

BlueIvy
- 67
- 2
- 10