自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 [网站建设]网页中插入音频

IE浏览器支持 embed,js中用name控制播放停止等 <embed name="music" src="C:\\Windows\\media\\Alarm01.wav" width="480" height="400" align="middle" autostart="true" hidden="true" loop="false&quo

2019-02-20 22:33:23 662

原创 [ruby on rails]用户注册登录

Helper定义方法 module SessionsHelper def log_in(user) session[:user_id]=user.id end def current_user @current_user ||= User.find_by(id: session[:user_id]) end def logged_...

2019-02-12 17:17:31 267

原创 [ruby on rails]使用cancancan

class Ability include CanCan::Ability def initialize(user) user ||= User.new can [:read, :home, :history, :show_cameras], :all if user.role == 'root' can :manage, :all elsif...

2019-02-12 17:10:02 336

原创 [网站建设]跳转到新页面后刷新一次

<script> if (location.href.indexOf("#reloaded") == -1) { location.href = location.href + "#reloaded"; location.reload(); } </script>

2019-02-12 17:07:28 1710

原创 [ruby on rails]flash结合bootstrap的使用

在view中使用,可以直接放在application.html.erb中 <% flash.each do |message_type,message| %> <%= message %> <% end %> 在controller中 flash[:danger]='xxxxxxx‘, flash[:success]=‘xxxxxxx’ ...

2019-02-03 22:08:41 310 1

原创 [ruby on rails]添加网站title

在application.html.erb中:<%= yield(:title) %> 在view中:<% provide (:title, ‘XXXXX’) %>

2019-02-03 21:59:23 812

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除