app/controllers/application_controller.rb
# render json reponse by using jbuilder
render json reponse by using jbuilder
render json reponse by using jbuilder
def render_json(*args)
		view_path, params = *args
		namespace = controller_path.split('/').first
		if namespace.size > 1
			render "#{namespace}/#{view_path}", params
		else
			render "#{view_path}", params
		end
	end
def render_json ( * args ) view_path , params = * args namespace = controller_path . split ( '/' ) . first if namespace . size > 1 render "#{namespace}/#{view_path}" , params else render "#{view_path}" , params end end
render json reponse by using jbuilder
render json reponse by using jbuilder
args
<not_specific>