Tag : Web

Userails g controller admin::articles index new editTo create a controller, userails g model articleThe model created. Route is namespace :admin do resources :articles end /app/controllers/admin/articles_controller.rb class Admin::ArticlesController < ApplicationController def index @articles = Article.all end def new @article = Article.new end def edit @article = Article.find(params[:id]) end /app/models/article.rb class Article < ActiveRecord::Base attr_accessible :content, :tag, ..

Read more

Do you want to know whether the large domestic company go web dev uses off-the-shelf web frameworks such as bee,echo gin, or native net/http+httprouter?Is there a big bull in a big company? I feel that if I don’t need a frame, many wheels will have to be built by myself. The frame is a tool, ..

Read more

Data in modleList Map[12: Sect Management 1204: Sect Member Information Modification 22: Picture Management 10: Permission Management 1006: Assigning User’s Sectional Change Permission’ x 2103: Article Modification 1201: New Sect 13 Added 03: Sectarian Information Modification 2: Content Management 21: Article Management 2101: Article Addition 1001: Delete Permission 1005: Withdraw User Sectarian Change Permission 2104: ..

Read more

runtime.GOMAXPROCS(runtime.NumCPU()); // var redisAddress string // redisAddress=”127.0.0.1:6379″ // defer c.Close() //The 5th DB is used by default to store the session. //[code] The link pool between the database and redis is implemented here //[code] end // v := daocore.InitRedis(“tcp”,redisAddress) http.HandleFunc(“/login/login”, handler.Apply) http.ListenAndServe(“:8666”, nil) Can be called in handler.Apply If what you really want to know ..

Read more