Top "Controller" questions

A controller is responsible for executing a sequence of instructions in response to some stimulus (maybe a command, action, or event).

Is the Rails update_attributes method the best choice for doing an update of a model in the database?

def update @album = Album.find(params[:id]) if @album.update_attributes(params[:album]) redirect_to(:action=>'list') else render(:…

ruby-on-rails model controller updatemodel update-attributes
Breadcrumbs in Ruby on Rails

I'm slightly insecure about my breadcrumb solution. Names and links are defined in each controller action: <a href="http://…

ruby-on-rails ruby controller breadcrumbs
How to call ApplicationController methods from ApplicationHelper

I want to provide csv links in a view and I placed the csv generating code in ApplicationHelper. However I'm …

ruby-on-rails ruby ruby-on-rails-3 controller view-helpers
Check if in "dev" mode inside a Controller with Symfony

When using dev mode with a Symfony2.x application, one usually works in locale. Hence, such function does not works …

php symfony dependency-injection controller containers
Rails current_page? versus controller.controller_name

I'm implementing current_page? in a view to test if the current controller and action is equal to a certain …

ruby-on-rails controller action current-page
MVC 4 return JSON as ActionResult

i'm trying to get my apicontroller to work. But somehow i cannot return Json(). Here's the error message from the …

c# json asp.net-mvc-4 controller asp.net-apicontroller
Return Image from Controller symfony2

I would like to know how can i return an image from the controller without any template. I would like …

symfony controller response
uninitialized constant

I'm trying to do this tutorial-> http://netbeans.org/kb/docs/ruby/rapid-ruby-weblog.html BUT its giving me this …

ruby controller netbeans6.7
Argh! Why does System.Web.Mvc.HandleErrorInfo get passed to my views?

I'm experiencing a rather frustrating problem. My MVC site runs fine for the most part, but randomly throws an error (…

c# asp.net-mvc controller views viewdata
Symfony2, check if an action is called by ajax or not

I need, for each action in my controller, check if these actions are called by an ajax request or not. …

ajax symfony controller