class Action::VARIABLEController < ApplicationController def METODO unless permitted_methods.include?(@type.to_s) raise Forcast::Application::Error::General.new(t('error_type_not_allow')) end send(@type) json_response(@response, 'ok') end def example @response = 'Im an example' end def permitted_methods ['example'] end end