Sha256: eefa7fb293c7885e2edcbe774f18d7387068a01697b40e55807372c6b71ac11e
Contents?: true
Size: 629 Bytes
Versions: 17
Compression:
Stored size: 629 Bytes
Contents
class <%=module_name_formatted.camelize%>Controller < ApplicationController respond_to :html, :json before_action :load_<%=module_name_formatted.singularize%>, only: [:show] def index @<%=module_name_formatted%> = <%=module_name_formatted.singularize.camelize%>.ordered.paginate(page: params[:page]) respond_with @<%=module_name_formatted%> end def show respond_with @<%=module_name_formatted.singularize%> end private def load_<%=module_name_formatted.singularize%> @<%=module_name_formatted.singularize%> = <%=module_name_formatted.singularize.camelize%>.find_by!(id: params[:id]) end end
Version data entries
17 entries across 17 versions & 1 rubygems