• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Pluginが広げるRailsの魅力
 

Pluginが広げるRailsの魅力

on

  • 8,513 views

Ruby勉強会@札幌-5

Ruby勉強会@札幌-5

Statistics

Views

Total Views
8,513
Views on SlideShare
8,132
Embed Views
381

Actions

Likes
7
Downloads
169
Comments
0

4 Embeds 381

http://d.hatena.ne.jp 342
http://fairyware.jp 18
http://coderwall.com 16
http://www.slideshare.net 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Pluginが広げるRailsの魅力 Pluginが広げるRailsの魅力 Presentation Transcript

    • http://noplans.org/product/t-shirt/
    • http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated
    • % ./script/plugin install http://svn.techno-weenie.net/projects/ plugins/acts_as_authenticated ( )
    • ./script/plugin install [URL]
    • % script/generate authenticated user account % rake db:migrate
    • http://localhost:3000/account/
    • http://localhost:3000/account/login
    • http://localhost:3000/account/signup
    • class ApplicationController include AuthenticatedSystem before_filter :login_from_cookie class MyController < ApplicationController before_filter :login_required before_filter :login_required, :only =>[:edit, :update]
    • <h3>Welcome user</h3> <% if logged_in? %> <p> Welcome, <%=h self.current_user.login %> </p> <% else %> <!-- login form goes here --> <% end %>
    • http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
    • ./script/plugin install http://svn.viney.net.nz/things/rails/plugins/ acts_as_taggable_on_steroids ruby script/generate acts_as_taggable_migration rake db:migrate
    • class Post < ActiveRecord::Base acts_as_taggable belongs_to :user end p = Post.find(:first) p.tag_list.to_s # quot;quot; p.tag_list = quot;Funny, Sillyquot; p.save p.reload.tag_list.to_s # quot;Funny, Sillyquot; p.tag_list.add(quot;Greatquot;, quot;Awfulquot;) p.tag_list.remove(quot;Funnyquot;)
    • Post.find_tagged_with('Funny, Silly') Post.find_tagged_with('Funny, Silly', :match_all => true) User.find(:first).posts.tag_counts .map{|t| quot;#{t.name}(#{t.count})quot;}
    • class ActsAsTaggableMigration < ActiveRecord::Migration def self.up create_table :tags do |t| t.column :name, :string end create_table :taggings do |t| t.column :tag_id, :integer t.column :taggable_id, :integer t.column :taggable_type, :string t.column :created_at, :datetime end add_index :taggings, :tag_id add_index :taggings, [:taggable_id, :taggable_type] end
    • http://www.yotabanana.com/hiki/ja/ruby-gettext.html
    • # gem install gettext
    • $KCODE=’u’ require 'gettext/rails' init_gettext quot;examplequot; # po
    • lang=ko lang=ja msgid quot;messagequot; msgstr quot; quot; msgid quot;Message|Textquot; msgstr quot; quot;
    • http://d.hatena.ne.jp/secondlife/20070207/1170835130
    • http://www.yotabanana.com/hiki/ja/ruby-gettext-howto-ror.html
    • http://jpmobile-rails.org/
    • http://blog.netswitch.jp/articles/tag/rails_plugin
    • http://andworkspace.net/
    • http://agilewebdevelopment.com/plugins/top_rated
    • http://www.railsify.com/