- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 rspec spec/ 测试不通过,报 undefined method `assertions' 错
Failures: 1) Authentication authorization for-non-signed-in users in the Users controller submitting to the update action Failure/Error: specify { expect(response).to redirect_to(signin_path)
2014-04-25 17:50:33 1699
原创 rails db:migrate 出错 bundle exec
rake aborted!Gem::LoadError: You have already activated rake 10.2.2, but your Gemfile requires rake 10.1.1. Prepending `bundle exec` to your command may so
2014-04-14 11:03:27 3354
转载 邮箱格式验证 js
JS正则表达式1)验证密码 function verifyPassword(str){ var reg=/^[A-Za-z0-9]+$/; if( reg.test(str) ){ return true; }else{ return false; } }2)检查邮箱
2014-04-09 10:04:30 963
原创 rails4 ajax实现验证用户存在否
假设用户表名是 users ,用户名 字段 是 name1、需为users对应的建一个controller,同时定义方法checknameapp\controllers\users_controller.rbclass UsersController < ApplicationController def checkname if User.where(name: pa
2014-04-03 11:17:52 978
原创 rails4 onclick事件不响应
rails4 新增了turbolinks插件,可以在项目的gemfile中看到 # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinksgem 'turbolinks'项目的manifest文件(一般是applicatio
2014-04-02 10:00:39 1132
原创 ActiveModel::ForbiddenAttributesError
升级到rails4之后,像这这样的语句会报错:ActiveModel::ForbiddenAttributesError@product = Product.new(params[:product])方法是改为@product = Product.new(product_params)同时增加私有方法product_params.class ProductsController
2014-04-01 14:10:42 854
原创 ruby on rails 4 中利用 remote:true 实现 ajax ,小记
_form.html.erb true do |f| %> postcontroller.rb def new @post = Post.new respond_to do |format| format.html format.json { re
2014-04-01 12:50:53 4898
OLE操作EXCEL之DLL实现(C++)
2013-09-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人