码迷,mamicode.com
首页 >  
搜索关键字:rails4    ( 16个结果
Rails学习:create操作 局部模板
学习Ruby on Rails实战真经里面说rails4使用了strong parameters,所以代码这么写:注意不是Event.new(params[:event])了,而是参数是函数返回值 def create @event = Event.new(event_params) ...
分类:其他好文   时间:2014-12-28 01:40:45    阅读次数:115
Centos7+apache+passenger+rails4.1.6部署的服务器实现局域网内部访问
问题: 在CentOS上安装apache,配置好服务器本机可以访问,但是外部局域网IP不能访问 解决方法:  1.我的项目配置文件passenger.conf  LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p598@rails416/gems/passenger-4.0.53/buildout/apache2/...
分类:Web程序   时间:2014-11-24 15:25:26    阅读次数:214
Centos7+httpd+fastcgi+rails安装
搭建的环境: centos7 Apache/2.4.6 fastcgi2.4.6 rails4 在安装fastcgi的时候遇到了问题: 问题: 。。。。。。 In file included from fcgi.h:28:0,                  from mod_fastcgi.c:72: /usr/include/httpd/http_log.h:456:...
分类:Web程序   时间:2014-11-21 09:13:07    阅读次数:404
ruby on rails4的session数据库存储方式
网上说的都是rake:db:sessions:create。但是对于rails4版本的就不起作用了。如下是我自己针对rails4版本的操作。rails4的session数据表创建:请参考这个文献:http://www.cnblogs.com/heimirror/p/3536965.html。1.找到项目的gemfile文件修改它:添加gem‘activerecord-session..
分类:数据库   时间:2014-09-26 19:32:30    阅读次数:192
default_scope 排序的使用
在以前的版本使用default_scope:default_scope:order=>‘title‘现在使用rails4的时候报错,参考(hellolucky‘sblog)http://blog.hellolucky.info/articles/ruby-on-rails-rails4-learning-experience-finishing-rails-4-zombie-outlaws-1/现在是这么用的default_scope{ord..
分类:其他好文   时间:2014-09-08 10:58:47    阅读次数:332
rails4.1 ,sqlserver2008 output for trigger
module ActiveRecord module ConnectionAdapters module Sqlserver module DatabaseStatements def sql_for_insert(sql, pk, id_value, sequenc...
分类:数据库   时间:2014-08-19 18:28:25    阅读次数:209
16条   上一页 1 2
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!