![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
个人练手项目memU
Luciano9esu
这个作者很懒,什么都没留下…
展开
-
memU是什么?
memU是我个人用来实践ROR的一个多用户blog站点,预计允许用户添加blog,图片,允许用户定义站点访问权限,允许授权用户引用文章,图片,添加评论。我会把实践中的点点滴滴记录与此,和大家一起学习。...2007-09-17 17:48:22 · 1000 阅读 · 0 评论 -
用了一个叫sitealizer的插件,太爽了
This plugin lets you track visitors, referrers, robots, search terms and more. And it shouldn’t influence your site’s performance because it only saves the basic visitor information (after every 10(de...2007-10-18 01:06:45 · 113 阅读 · 0 评论 -
使用和学习authenticate插件-场景login
authenticate是一个非常有用,也使用非常普遍的插件,在制作memU的时候舍弃了自己造轮子的想法,转而使用这个插件,插件代码不难,但是通过阅读,仍然有很大的收获,下面简单分析一下authentic的源码从Login说起首先从登录场景开始分析ruby 代码 def login return unless request.post? sel...2007-10-19 23:04:15 · 243 阅读 · 0 评论 -
使用和学习authenticate插件-场景signup
signup实际上就是我们说的注册,我习惯用register。。不知道跟哪个论坛学的,还是老外的正宗些。ruby 代码 def signup @user = User.new(params[:user]) return unless request.post? @user.save! self.current_use...2007-10-19 23:16:41 · 182 阅读 · 0 评论 -
使用和学习authenticate插件-场景logout
ruby 代码 def logout self.current_user.forget_me if logged_in? cookies.delete :auth_token reset_session flash[:notice] = "You have been logged out." redir...2007-10-19 23:25:30 · 181 阅读 · 0 评论 -
使用和学习authenticate插件-模型类
ruby 代码 require 'digest/sha1' class User < ActiveRecord::Base # Virtual attribute for the unencrypted password attr_accessor :password validates_presenc...2007-10-19 23:42:54 · 145 阅读 · 0 评论 -
使用和学习authenticate插件-AuthenticatedSystem类
这篇文章简单的分析一下AuthorenticatedSystem类,我把相关连的代码放在一起,方便分析,首先列出最常用的三个方法ruby 代码 # Returns true or false if the user is logged in. # Preloads @current_user with the user model if they're logged ...2007-10-20 00:37:36 · 352 阅读 · 0 评论