0
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 < Ap...
<h3>Welcome user</h3>
<% if logged_in? %>
 <p>
  Welcome, <%=h self.current_user.login %>
 </p>
<% else %>
 <!-- login for...
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 ...
class Post < ActiveRecord::Base
  acts_as_taggable
  belongs_to :user
end

    p = Post.find(:first)
    p.tag_list.to_s # q...
Post.find_tagged_with('Funny, Silly')



Post.find_tagged_with('Funny, Silly', :match_all => true)




User.find(:first).posts...
class ActsAsTaggableMigration < ActiveRecord::Migration
  def self.up
   create_table :tags do |t|
     t.column :name, :s...
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;
         ...
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/
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
Upcoming SlideShare
Loading in...5
×

Pluginが広げるRailsの魅力

6,027

Published on

Ruby勉強会@札幌-5

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,027
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
172
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide

Transcript of "Pluginが広げるRailsの魅力"

  1. 1. http://noplans.org/product/t-shirt/
  2. 2. http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated
  3. 3. % ./script/plugin install http://svn.techno-weenie.net/projects/ plugins/acts_as_authenticated ( )
  4. 4. ./script/plugin install [URL]
  5. 5. % script/generate authenticated user account % rake db:migrate
  6. 6. http://localhost:3000/account/
  7. 7. http://localhost:3000/account/login
  8. 8. http://localhost:3000/account/signup
  9. 9. class ApplicationController include AuthenticatedSystem before_filter :login_from_cookie class MyController < ApplicationController before_filter :login_required before_filter :login_required, :only =>[:edit, :update]
  10. 10. <h3>Welcome user</h3> <% if logged_in? %> <p> Welcome, <%=h self.current_user.login %> </p> <% else %> <!-- login form goes here --> <% end %>
  11. 11. http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
  12. 12. ./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
  13. 13. 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;)
  14. 14. 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;}
  15. 15. 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
  16. 16. http://www.yotabanana.com/hiki/ja/ruby-gettext.html
  17. 17. # gem install gettext
  18. 18. $KCODE=’u’ require 'gettext/rails' init_gettext quot;examplequot; # po
  19. 19. lang=ko lang=ja msgid quot;messagequot; msgstr quot; quot; msgid quot;Message|Textquot; msgstr quot; quot;
  20. 20. http://d.hatena.ne.jp/secondlife/20070207/1170835130
  21. 21. http://www.yotabanana.com/hiki/ja/ruby-gettext-howto-ror.html
  22. 22. http://jpmobile-rails.org/
  23. 23. http://blog.netswitch.jp/articles/tag/rails_plugin
  24. 24. http://andworkspace.net/
  25. 25. http://agilewebdevelopment.com/plugins/top_rated
  26. 26. http://www.railsify.com/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×