配信はないけどチケットと新幹線と地下鉄ならありますよー! https://t.co/hK8UJV1pyY #rubykaigi https://t.co/PYl8ARZmtR
Modeling recurring events in a calendar is an interesting problem to solve. There are many different scenarios in which you might need to model recurring events, but in this article I will walk through a simple example of weekly recurring events in a Rails app. Although this post covers most of the code needed for the example, I will skip over some of the details (such as views), and you will have
このガイドの内容: API専用アプリケーションを支援するRailsの機能 Railsの起動時にブラウザ向け機能をオフにする方法 ミドルウェアの選定 コントローラで使うモジュールの選定 1 APIアプリケーションについて 従来、Railsの「API」というと、プログラムからアクセスできるAPIをWebアプリケーションに追加することを指すのが通例でした。たとえば、GitHubが提供するAPIはカスタムクライアントから利用できます。 近年、さまざまなクライアント側フレームワークが登場したことによって、Railsで構築したバックエンドサーバーを他のWebアプリケーションとネイティブアプリケーションの間で共有する手法が増えてきました。 たとえば、X.comは自社のWebアプリケーションでパブリックAPIを利用しています。このWebアプリケーションは、JSONリソースを消費するだけの静的サイトとして構
本ガイドでは、Action Cableのしくみと、WebSocketをRailsアプリケーションに導入してリアルタイム機能を実現する方法について解説します。 このガイドの内容: Action Cableの概要、バックエンドとフロントエンドの統合 Action Cableの設定方法 チャネルの設定方法 Action Cable向けのデプロイとアーキテクチャの設定 1 はじめに Action Cableは、WebSocketとRailsのその他の部分をシームレスに統合します。Action Cableを導入すると、Railsアプリケーションのパフォーマンスとスケーラビリティを損なわずに、通常のRailsアプリケーションと同じスタイル・方法でリアルタイム機能をRubyで記述できるようになります。Action Cableはフルスタックのフレームワークであり、クライアント側のJavaScriptフレー
Active SupportはRailsのコア機能の1つであり、Ruby言語の拡張、ユーティリティなどを提供するものです。Active Supportに含まれているInstrumentation APIは、Rubyコードで発生する特定の動作の計測に利用できます。Railsアプリケーション内部やフレームワーク自身の計測はもちろん、必要であればRails以外のRubyスクリプトなども測定できます。 本ガイドでは、RailsなどのRubyコード内のイベント計測に使われる、Active SupportのInstrumentation APIについて解説します。 このガイドの内容: Instrumentationでできること Railsフレームワーク内のInstrumentationフック フックにサブスクライバを追加する 独自のInstrumentationを実装する 1 Instrumentat
Rails 5.0の注目ポイント Action Cable Rails API Active Record属性API テストランナー Rakeコマンドをrailsコマンドに統一 Sprockets 3 Turbolinks 5 Ruby 2.2.2以上が必須 本リリースノートでは、主要な変更についてのみ説明します。多数のバグ修正および変更点については、GitHubのRailsリポジトリにあるコミットリストのchangelogを参照してください。 1 Rails 5.0へのアップグレード 既存のアプリケーションをアップグレードするのであれば、その前に質のよいテストカバレッジを用意するのはよい考えです。アプリケーションがRails 4.2までアップグレードされていない場合は先にそれを完了し、アプリケーションが正常に動作することを十分確認してからRails 5.0にアップデートしてください。アッ
“Rails”, “Ruby on Rails”, and the Rails logo are registered trademarks of David Heinemeier Hansson, but are under exclusive license to The Rails Foundation, which is responsible for administering their use and permission. You may not use these trademarks in a commercial setting to imply that your product or service is endorsed or associated with Ruby on Rails without permission. You may use these
About 12 years ago, I co-founded a startup called Basecamp: A simple project collaboration tool that helps people make progress together, sold on a monthly subscription. It took a part of some people’s work life and made it a little better. A little nicer than trying to manage a project over email or by stringing together a bunch of separate chat, file sharing, and task systems. Along the way it m
Recently, I wrote some code to query Google Books API, and extracted it into a Hex package. In this article, we will walk through the process of publishing an Elixir package to hex.pm. Let’s start by generating a new project called google_books using mix: mix new google_books The files we will be working with are mix.exs and lib/google_books.ex, which contains the GoogleBooks module where we will
3.1 Railsバージョンごとのデフォルト値 config.load_defaultsはターゲットバージョンとそれ以前のすべてのバージョンのデフォルトの設定値を読み込みます。たとえば、config.load_defaults 6.1はバージョン6.1までの全バージョンのデフォルトを読み込みます。 ターゲットバージョンごとに関連するデフォルト値を以下に示します。値が矛盾する場合は、新しいバージョンが古いバージョンより優先されます。 3.1.1 ターゲットバージョン8.1のデフォルト値 config.action_controller.action_on_path_relative_redirect : :raise config.action_controller.escape_json_responses : false config.action_view.remove_hidden_
Demystifying @tenderlove's homeopathic code optimizations 05 Jun 2015 At the Keep Ruby Weird conference, Aaron Patterson, aka @tenderlove, gave a hilarious keynote talk where he mentioned homeopathic code optimizations. If you haven’t watched it yet, go watch it now. For those that haven’t watched the video, here’s the idea: he talks about a program dilute.rb, that takes another ruby program and “
Have you ever seen “No newline at end of file” in your git diffs? Us, too. ~/.dotfiles% git diff diff --git a/vimrc b/vimrc index 7e31913..a8b5f95 100644 --- a/vimrc +++ b/vimrc @@ -2,4 +2,4 @@ let configs = split(glob("~/.vim/configs/*"), "\n") for filename in configs execute 'source ' filename -endfor +endfor \ No newline at end of file Why does this happen and what does it mean? Try it in your
%a %A %b %B %c %d %e %E %f %g %G %i %o %p %s %u %x %X %% 0 $ # + - * space Ruby comes with a structured alternative to classic string interpolation: This episode will explore format strings, also known as the sprintf syntax. Recall the normal way of interpolating variables into a string: v = 42 "--> #{v} <--" # => "--> 42 <--" Format strings are different in that they use a string template and bin
About Idiosyncratic Ruby Ruby is not only optimized for developer happiness, but also for writing concise one-liners. The language is extremely expressive, but this comes at a price: Ruby's grammar definition is more than 13 000 lines long, the language is at its limits, and there is not a single editor or syntax highlighter which actually highlights Ruby correctly. Idiosyncratic != Bad Ruby is st
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く