Top "Actioncontroller" questions

ActionController is the main controller class in Ruby on Rails.

How to set config.action_controller.default_url_options = {:host = '#''} on per environment basis

Right now I'm using this which works for the development host, but I have to manually change the {:host => ""} …

ruby-on-rails ruby-on-rails-3 actioncontroller
Accessing UserManager outside AccountController

I am trying to set the value of a column in aspnetuser table from a different controller (not accountcontroller). I …

asp.net-mvc asp.net-mvc-5 asp.net-identity-2 actioncontroller
How do I configure the hostname for Rails ActionMailer?

I'm working on a fairly traditional forgot password email - I want to email the user a password change token …

ruby-on-rails actionmailer hostname actioncontroller
default_url_options and rails 3

As ActionController::Base#default_url_options is deprecated, I wonder how to set default url options in rails3. The default …

ruby-on-rails-3 actioncontroller
Does Rails come with a "not authorized" exception?

I am writing an application that uses plain old Ruby objects (POROs) to abstract authorization logic out of controllers. Currently, …

ruby-on-rails ruby actioncontroller
Rails 3: Get current namespace?

using a method :layout_for_namespace I set my app's layout depending on whether I am in frontend or backend, …

ruby-on-rails ruby-on-rails-3 namespaces actioncontroller
how to execute an action if the before_action returns false

I know that with the following code: before_action :signed_in?, only: [:new] the action new will be executed if …

ruby-on-rails callback actioncontroller
rescue_from ActionController::RoutingError in Rails 4

I've got the following error: ActionController::RoutingError (No route matches [GET] "/images/favicon.ico") I want to show error404 page …

ruby-on-rails ruby ruby-on-rails-4 ruby-on-rails-5 actioncontroller
how to validate a record in table before saving in ruby on rails

I am new to Ruby on Rails I have a scenario in which I have a form which has some …

ruby-on-rails model actioncontroller
how to handle exceptions in JSON based RESTful code?

I have a "software as a service" app that uses JSON communicated via a RESTful API. Simply stated: what are …

ruby-on-rails json actioncontroller