摘要: ActiveSupport::CoreExtensions::String::Inflectionsclassify()&&contantize()四种方法,假设str是类名:obj=eval(str).newobj=eval"obj=#{str}.new"c=Object.const_get("Array")s=c.neweval"obj=#{str}.new" # 只能在irb中使用# post: /material_attributes/destroy_material_attributes.json# 根据传过 阅读全文
posted @ 2013-11-26 22:22 yaocanwei 阅读(781) 评论(0) 推荐(0) 编辑
摘要: 跑rails3 竟然出现这么个鸟问题在baidu文库里找到个解决方法,说是 ipv6的缘故localhost 和 127.0.0.1 对应不起来然后修改hosts文件 取消 相应代码的注释,解决! 阅读全文
posted @ 2013-11-26 22:12 yaocanwei 阅读(138) 评论(0) 推荐(0) 编辑
摘要: git branch 查看本地所有分支git status 查看当前状态git commit 提交git branch -a 查看所有的分支git branch -r 查看本地所有分支git commit -am "init" 提交并且加注释git remote add origin git@192.168.1.119:ndshowgit push origin master 将文件给推到服务器上git remote show origin 显示远程库origin里的资源git push origin master:developgit push origin master 阅读全文
posted @ 2013-11-26 22:09 yaocanwei 阅读(114) 评论(0) 推荐(0) 编辑