Nowadays, there is a growing need to have mechanisms that allows us to control who performed a particular action in a system. Rails provide us a lot of useful tools that help us build awesome solutions, but by default it does not offer us relevant tools to achieve this purpose. Most of the time what we get to know is the date of the last change of a particular record and the date of its creation,
PWAとは? PWAとは、「Progressive Web Apps」の略称で、PCやスマホでWebアプリを表示する際に、ネイティブアプリのような動作を可能にする仕組みのことです! PWAを導入するメリットとして OSによる制限がないこと プッシュ通知を送ることができること ホーム画面にアイコンを設置できること Webアプリ上でキャッシュを使用でき、ローカルのキャッシュに保存できるため、再びアプリを開いた際の読み込みのスピードが従来よりも速くなること などが挙げられます! 実装 まずは、app/views/layouts/application.html.erbに以下のように2箇所追記します! <!DOCTYPE html> <html> <head> <title>Example</title> <%= favicon_link_tag('favicon.ico') %> + <link
この記事はRails Advent Calendar 2014の21日目の記事です。 Qiitaでは投稿の履歴管理にpaper_trailというgemを使っています。本稿ではPaperTrailがどんな感じでイベント情報をDBに保存しているかを紹介しつつ、PaperTrailが作り出すversionオブジェクトの渡り歩き方を簡単に解説したいと思います。 PaperTrailを使ってみよう 前提 PaperTrailで管理している Item modelがあり、そのインスタンスを2回編集してから削除したとします。 コードで表現するならこんな感じです。 class Item < ActiveRecord::Base has_paper_trail end item = Item.create(body: 'foo') item.update_attributes(body: 'bar') ite
Efficient, immutable, and thread-safe collection classes for Ruby. The immutable-ruby gem provides 6 Persistent Data Structures: Hash, Vector, Set, SortedSet, List, and Deque (which works as an immutable queue or stack). Whenever you "modify" an Immutable collection, the original is preserved and a modified copy is returned. This makes them inherently thread-safe and shareable. At the same time, t
多数のポータブルゲーミングPCをリリースしているAYAは今年、2つの物理QWERTY搭載モデルを投入予定です。 一つが画面スライド式の「AYANEO Slide」で、今年9月にクラファン開始予定でしたがまだ始まっていません。↓
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く