In this guide you will learn about engines and how they can be used to provide additional functionality to their host applications through a clean and very easy-to-use interface. After reading this guide, you will know: What makes an engine. How to generate an engine. How to build features for the engine. How to hook the engine into an application. How to override engine functionality in the appli
If you don't like errors in your code, you will have to fix them. This handy list of Ruby's errors will hopefully help you do so! (And welcome back for the second season of Idiosyncratic Ruby!) Built-in Exceptions Exception Thrown by core Ruby when Remarks NoMemoryError The Ruby interpreter could not allocate the required memory "Idiosyncratic" * 100_000_000_000 ScriptError - Not thrown directly S
Ruby on Railsの生みの親、Basecamp(旧 37signals)のファウンダーでCTOのDavid Heinemeier Hanssonさんによる寄稿記事です。著書に、ニューヨーク・タイムズの�ベストセラー「REWORK」と「REMOTE」。「ル・マン24時間レース」のクラス優勝者。Davidさんの活動は、ご本人のWebサイト、またTwitter(@DHH)でフォローできます。本記事は、Mediumに投稿された記事をDavidさんから許可を得て翻訳したものです。元の英語記事もどうぞ。 *記事は、「Web Summit 2015」のDavidさんの講演内容を起こしたものです。 #WEBSUMMIT2015 12年前、僕はBasecampというスタートアップを共同創業した。月額制のシンプルなコラボレーションツールで、チーム間のプロジェクト進行を後押ししてくれる。 それがあること
Rails: Has One Through Polymorphic Relation As I’ve described in my blog post “Rails Polymorphic Associations” I’ve stated that polymorphic relations in Rails are best for scenarios where a model may “belong to” one of many other kinds of model. So a Comment model with the polymorphic commentable relationship can belong to any other record in your Rails app. This is a child to be adopted by any
Rails follows the Ruby guidelines for conduct in all collaborative spaces, such as mailing lists, submitted patches, commit comments: Participants are expected to be tolerant of opposing views. Participants must ensure that their language and actions are free from personal attacks and disparaging remarks. When interpreting the words and actions of others, participants should always assume good int
Update (2023-06-28): Added “I required a file, but I want to know what files were actually loaded” I love puts debugging I am a puts debuggerer. I don’t say this to disparage people that use a Real Debugger. I think Real Debuggers are great, I’ve just never taken the time to learn one well. Every time I try to lean one, I end up not using it for a while and have to re-learn how to use it. Anyway,
Screenshot of the original Agile Manifesto. http://t.co/IBDJS1xlRy
Ruby on Rails’ phenomenal rise to prominence owed much of its lift-off to novel technology and timing. But technological advantages erode over time, and good timing doesn’t sustain movements alone over the long term. So a broader explanation of how Rails has continued to not only stay relevant but to grow its impact and community is needed. I propose that the enduring enabler has been and remains
When your models are bloated with methods that are only used in views, it might be a good time to refactor them. Moving that logic into helper modules might be OK in some cases, but as the complexity of your views grows, you might want to look at presenters. Presenters give you an object oriented way to approach view helpers. In this post, I will walk through how we refactored our views to use pre
101 Ruby Code Factoids 0) ‘methods’ method Since almost everything in Ruby is an Object you can type dot methods on it to see what methods are available. 4.methods - Object.methods # => [:-@, :+, :-, :*, :/, :div, :%, :modulo, :divmod, :fdiv, :**, :abs, :magnitude, :~, :&, :|, :^, :[], :<<, :>>, :to_f, :size, :bit_length, :zero?, :odd?, :even?, :succ, :integer?, :upto, :downto, :times, :next, :pre
When designing a UI we usually go right from a quick paper sketch to HTML/CSS. We skip the static Photoshop mockup. Here are a few reasons why we skip photoshop: You can’t click a Photoshop mockup. This is probably the number one reason we skip static mockups. They aren’t real. Paper isn’t real either, but paper doesn’t have that expectation. A Photoshop mockup is on your screen. If it’s on your s
Rails 5.0 is almost here! The first beta version has been released already, and you can try out some of the shiny new features right away. So what are the new features? Let’s take a quick tour of the new features and major changes. ActionCable Websocket support in Rails is the most talked about feature in Rails 5. This will make it super easy to add realtime features to your app. If you’re plannin
Inline Caching Every time you call a method, Ruby must look up the method you want to call before actually calling that method. Trying to figure out what method needs to be called can be a costly operation. So one thing that virtual machine authors try to do is to speed up that process by caching the method lookup. MRI (and most other Ruby virtual machines) store this cache “inline”. Most of us kn
Welcome to Rails Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. Understanding the MVC pattern is key to understanding Rails. MVC divides your application into three layers, each with a specific responsibility. The Model layer represents your domain model (such as Account, Product,
Ruby 2.3.0 will be released this Christmas, and the first preview release was made available a few weeks ago. I’ve been playing around with it and looking at what new features have been introduced. # Install using RVM rvm install 2.3.0 # Using Rbenv brew upgrade ruby-build --HEAD rbenv install 2.3.0 Safe navigation operator A new operator (&.) has been introduced. It can be very useful in cases wh
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く