Enumerize - Enumerated attributes with I18n and ActiveRecord/Mongoid support. It can be integrated with Simple Form. counter_culture - Turbo-charged counter caches for your Rails app. Huge improvements over the Rails standard counter caches. custom_counter_cache - A simple approach to creating a custom counter cache that can be used across multiple models. Sequenced - Sequenced is a simple gem tha
prepend(*modules) -> self[permalink][rdoc] 指定したモジュールを self の継承チェインの先頭に「追加する」ことで self の定数、メソッド、モジュール変数を「上書き」します。 継承チェイン上で、self のモジュール/クラスよりも「手前」に 追加されるため、結果として self で定義されたメソッドは override されます。 modules で指定したモジュールは後ろから順に処理されるため、 modules の先頭が最も優先されます。 また、継承によってこの「上書き」を処理するため、prependの引数として 渡したモジュールのインスタンスメソッドでsuperを呼ぶことで self のモジュール/クラスのメソッドを呼び出すことができます。 実際の処理は modules の各要素の prepend_features を後ろから順に呼びだす
I was watching a video by Aaron Patterson, where he highlighted a few Ruby performance tuning tools. I thought it would be useful to write a quick post to gather them all together in the same place. Benchmark The classic tool for testing if one block of code is faster than the other in Ruby is the Benchmark module. It comes built in, and is pretty simple to use: require 'benchmark' h = { foo: 1, b
Subscribe to my Newsletter 😻 🤠 Join thousands of developers who get new code, writing, and programming links from me delivered to their inboxes. Keep Reading 🚀 Docker without Dockerfile: Build a Ruby on Rails application image in 5 minutes with Cloud Native Buildpacks (CNB) I love the power of containers, but I’ve never loved Dockerfile. In this post we’ll build a working OCI image of a Ruby on
Rails gives us a great DSL for constructing most queries. With its knowledge of the relationships between our tables, it’s able to construct join clauses with nothing more than the name of a table. It even aliases your tables automatically! The method we most often reach for when querying the database is the where method. 80% of the time, your query will only be checking equality, which is what wh
Alternate Usage If you don't like the way the rake tasks generate files, you can run the "railroady" command-line tool to manually generate DOT diagram source code. See the README for details. Features Trivial to integrate Simple to install and run. Dynamic Reverse engineer your existing source code. No more stupid Vizio diagrams that are perpetually outdated. Vector Graphics Rake tasks generate s
Sam Saffron Programming, Technology and the Art of Hacking At some point in the life of every Rails developer you are bound to hit a memory leak. It may be tiny amount of constant memory growth, or a spurt of growth that hits you on the job queue when certain jobs run. Sadly, most Ruby devs out there simply employ monit , inspeqtor or unicorn worker killers. This allows you to move along and do mo
What does a developer do when he likes the usability of a graphical editor like Textmate, but wants the configurability of Vim or Emacs? The answer is Sublime Text. I used to write my programs in Textmate. After seeing Sublime Text in action at a Ruby meet-up I downloaded it. Sublime Text is fast, developer sleek, and modifiable. I write Ruby everyday in Sublime Text and have learned ways to work
tags: Databases, Ruby on Rails, Scaling date: 2011-02-28 20:58:51.000000000Z ##Information The gem: Octopus Repo: https://github.com/tchandy/octopus Creator and maintainer: tchandy Contributors: https://github.com/tchandy/octopus/contributors Seriously wtf is database sharding? Database sharding is a method of horizontal partitioning in a database or search engine. Each individual partition is ref
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. There's plenty of stuff in Ruby that I've either not noticed before, noticed but forgotten about, or otherwise failed to realize the utility of. Add to that all the awesome Ruby tricks and techniques I'm seeing in people's code over on Github lately and.. we need a new series here: Ruby Techniques Revealed! Disclaimer: I'm
RailsなどのRubyライブラリのソースコードを見ていると、よく File.expand_path('相対パス', __FILE__) という一文を目にする。ちょっと調べてみた。 File.expand_pathとは riコマンドで調べてみる $ ri File.expand_path (from ruby core) ------------------------------------------------------------------------------ File.expand_path(file_name [, dir_string] ) -> abs_file_name ------------------------------------------------------------------------------ Converts a pathname
A book from the Effective Software Development Series, written by Peter J. Jones. Practical advice for intermediate Ruby programmers, split into 48 actionable items. Kick bad habits from other languages and embrace the Ruby way of doing things. Expert guidance on Ruby internals such as the hidden inheritance hierarchy and the generational garbage collector in Ruby 2.1. Buy the book at InformIT.com
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く