随笔分类 -  rails template和常用gem

80template的Rails开发模版,以及常用gem的使用文档。
摘要:FontAwesome::Sass(5.x版) https://fontawesome.com/icons?d=gallery&m=free 只能使用免费的。 在app/assets/stylesheets/application.scss中载入 Rails Helper usage: 三种格式的i 阅读全文
posted @ 2018-06-30 11:05 Mr-chen 阅读(1220) 评论(0) 推荐(0)
摘要:用于代码瘦身。 老鸟建议:不要混写js 和 html,如果避免不了,当前文件可以改为erb格式,混用slim和erb不是什么问题。 git: https://github.com/slim-template/slim 不同编译器有不同的高亮等工具,在git最底部。 atom: 直接从设置里面搜索la 阅读全文
posted @ 2018-06-28 20:33 Mr-chen 阅读(533) 评论(0) 推荐(0)
摘要:Lograge https://github.com/roidrage/lograge 改良Rails默认的请求日志的记录。 它会精明的处理好那些noisy和无用的,未解析的,在context中运行多进程和服务器,不能读的默认日志输出。 Rails默认的方法:记录每件事。这在开发时很棒,但是在生产环 阅读全文
posted @ 2018-06-28 15:05 Mr-chen 阅读(345) 评论(0) 推荐(0)
摘要:https://github.com/puma/puma 在开发和产品环境下,Puma是一个简单,快速,多线程,并高并发highly concurrent HTTP1.1server for Ruby/Rack程序。 什么是多线程? multithreading 指从软件或者硬件上实现多个线程并发执 阅读全文
posted @ 2018-06-28 10:32 Mr-chen 阅读(1415) 评论(0) 推荐(0)
摘要:Mina (3800🌟) 80template使用的gem: gem 'mina', '~> 1.2.2', require: falsegem 'mina-puma', '~> 1.1.0', require: falsegem 'mina-multistage', '~> 1.0.3', re 阅读全文
posted @ 2018-06-28 10:19 Mr-chen 阅读(309) 评论(0) 推荐(0)
摘要:rails console后: 这是因为Active Record 建立连接是惰性的lazily。 直接用查询语法就好。 gem 'faker'后就直接可以用了。 顶多写一句require 'faker' 阅读全文
posted @ 2018-06-26 20:01 Mr-chen 阅读(279) 评论(0) 推荐(0)
摘要:Sidekiq (8700✨) git : https://github.com/mperham/sidekiq https://www.cnblogs.com/richard1234/p/3829074.html (一篇文章,讲的比较清楚) https://wdxtub.com/2016/07/0 阅读全文
posted @ 2018-06-26 09:43 Mr-chen 阅读(3311) 评论(0) 推荐(0)
摘要:border:可以用原生css实现效果。❌没看clearfix, float, ✅close icon ✅colors ✅display✅ 各种显示的格式。embed ✅ <iframe>等元素插入video, 视频,视频,视频flex ✅image replacement ❌,没看明白。Posit 阅读全文
posted @ 2018-06-24 11:04 Mr-chen 阅读(623) 评论(0) 推荐(0)
摘要:Content Reboot:从新写了主要元素的排列。 本章讲了各种元素及其相关的类。 ⚠️ 文档左上角有搜索栏。 Components Alert✅Badge✅Button✅和Button group⚠️概览Card✅Carousel轮播图⚠️概览,Collapse隐藏/显示 功能✅Dropdow 阅读全文
posted @ 2018-06-21 21:16 Mr-chen 阅读(642) 评论(0) 推荐(0)
摘要:学习目的: 对一些主要的gem进行学习了解基本功能: 作者的一些答复:(链接) 关于安全配置: 对于配置文件, 安全仅有一点: 不要提交任何敏感信息到服务端. 所以 rails-template 是添加了一个 config/application.yml.example, 随后由开发者自行复制一份为 阅读全文
posted @ 2018-06-21 09:05 Mr-chen 阅读(438) 评论(0) 推荐(0)
摘要:文档: https://getbootstrap.com/docs/4.1/layout/overview/ w3c的案例:很直观: https://www.w3schools.com/bootstrap4/bootstrap_grid_system.asp Bootstrap Ruby Gem 下 阅读全文
posted @ 2018-06-21 09:04 Mr-chen 阅读(299) 评论(0) 推荐(0)
摘要:学习目的:基础使用。 能够开发RoR就行。 git: https://github.com/postgres-cn/pgdoc-cn 1.2. 架构基础 PostgreSQL使用一种客户端/服务器的模型。 一次PostgreSQL会话由下列相关的进程(程序)组成: 一个服务器进程process: 管 阅读全文
posted @ 2018-06-19 10:24 Mr-chen 阅读(389) 评论(0) 推荐(0)
摘要:本章讲了如何定位❌,和排除bug. Pry (5000🌟)a Ruby console. 可以替代irb。增加了一些配合的gems,是一个杰出的debugger工具。使用:在测试和开发环境使用:gem "pry-rails" # 取代irb ,在命令行输入pry⚠️,安装pry时,在gem文件内输 阅读全文
posted @ 2018-06-04 22:01 Mr-chen 阅读(788) 评论(0) 推荐(0)
摘要:git指南: https://github.com/plataformatec/devise 维基百科上有how to 的很多文章。 Stackoverflow有大量问题的答案。 全的文档devise:API 7-20新增: warden:https://github.com/wardencommu 阅读全文
posted @ 2018-05-14 10:45 Mr-chen 阅读(439) 评论(0) 推荐(0)