
Ruby
带金箍的至尊宝
这个作者很懒,什么都没留下…
展开
-
cenntos7安装Nginx添加passenger模块
启用EPEL sudo yum install -y yum-utils sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(< /etc/redhat-release tr -dc '0-9.'|cut -d \. -f1).noarch.rpm sudo yu...翻译 2019-09-17 01:02:16 · 727 阅读 · 1 评论 -
ruby on rails时间判断异常
application.rb中配置的时区是北京 config.time_zone = ‘Beijing’ config.active_record.default_timezone = :local 数据库表bills,其中字段创建时间created_at 查询语句 bill = Bill.where("created_at>'2018-12-31 20:00:00' and create...原创 2019-03-17 15:12:07 · 308 阅读 · 0 评论 -
Ruby定义静态方法
** Ruby静态方法 ** Ruby 提供了不用实例化即可访问方法的方式。方法如下: class ClassName def reading_charge end def ClassName.hello return hello end end 其中hello 调用方法如下所示: ClassName.hello ...原创 2018-12-20 14:33:19 · 955 阅读 · 0 评论