おすすめ gem

おすすめ gem

Slideshare (http://www.slideshare.net/chocoby/gem-13022540) にアップロードしていたものですが、Speaker Deck にアップロードしてみました。
社内の LT で発表したものです。

37d7ffd14a3d1af0627fcb48e09f0c9a?s=128

Kenta Okamoto

July 02, 2012
Tweet

Transcript

  1. 5.

    *** REMOTE GEMS *** activerecord-jdbcmysql-adapter (1.2.2, 1.0.3 java) activerecord-mysql-adapter-flags (0.0.3)

    activerecord-mysql2-retry-ext (0.1.0) activerecord-mysql2legacydb-adapter (0.2.0) activerecord-mysql2spatial-adapter (0.4.2) activerecord-mysqlspatial-adapter (0.4.1) airblade-mysql_s3_backup (0.0.4) aqueduct-mysql (0.1.0) capistrano-mysqldump (1.06) create_rails_mysql_db (0.2.3) ...
  2. 7.

    *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.2.1) actionpack (3.2.1)

    activemodel (3.2.1) activerecord (3.2.1) activeresource (3.2.1) activesupport (3.2.1) addressable (2.2.8) arel (3.0.0) awesome_print (1.0.2) ...
  3. 17.
  4. 24.
  5. 25.
  6. 26.
  7. 27.
  8. 29.

    # app/models/ability.rb class Ability include CanCan::Ability def initialize(user) user ||=

    User.new can :destroy, Post, user_id: user.id end end # app/controllers/posts_controller.rb class PostsController < ApplicationController before_filter :authenticate_user! load_and_authorize_resource # app/views/posts/edit.erb <% if can? :destroy, @user %> <%= link_to '࡟আ', posts, method: :delete %> <% end %>
  9. 33.
  10. 38.
  11. 40.
  12. 42.
  13. 44.
  14. 53.