Sha256: 88c34464436fa196c3c8880470e49735b8a60039a27ea6f4db8ab055418f795f
Contents?: true
Size: 1.14 KB
Versions: 167
Compression:
Stored size: 1.14 KB
Contents
require_dependency "educode_sales/application_controller" module EducodeSales class ResultsController < ApplicationController def index respond_to do |format| format.html do end format.json do # @commons = Common.group("clazz").page(params[:page]).per(params[:limit]) end end end # def create # common = Common.new(name: params[:name], clazz: params[:clazz]) # if common.save # render_success # else # render_failure common # end # end # # def edit # @common = Common.find(params[:id]) # render layout: false # end # # def update # common = Common.find(params[:id]) # if common.update(common_params) # render_success # else # render_failure common # end # end # # def new # render layout: false # end # # def show # commons = Common.find(params[:id]) # @commons = Common.where(clazz: commons.clazz).order('position') # end # # private # # def common_params # params.permit(:name, :position) # end end end
Version data entries
167 entries across 167 versions & 1 rubygems