Prefixes to statuses are added now automatically in client

This commit is contained in:
Martin Lensment 2014-09-26 10:47:09 +03:00
parent 96eead47b7
commit 5083062de4
4 changed files with 23 additions and 2 deletions

View file

@ -3,7 +3,7 @@ class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter do
before_action do
resource = controller_name.singularize.to_sym
method = "#{resource}_params"
params[resource] &&= send(method) if respond_to?(method, true)