Pluginが広げるRailsの魅力

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    5 Favorites & 1 Group

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

    1. http://noplans.org/product/t-shirt/
    2. http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated
    3. % ./script/plugin install http://svn.techno-weenie.net/projects/ plugins/acts_as_authenticated ( )
    4. ./script/plugin install [URL]
    5. % script/generate authenticated user account % rake db:migrate
    6. http://localhost:3000/account/
    7. http://localhost:3000/account/login
    8. http://localhost:3000/account/signup
    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. <h3>Welcome user</h3> <% if logged_in? %> <p> Welcome, <%=h self.current_user.login %> </p> <% else %> <!-- login form goes here --> <% end %>
    11. http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
    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. class Post < ActiveRecord::Base acts_as_taggable belongs_to :user end p = Post.find(:first) p.tag_list.to_s # \"\" p.tag_list = \"Funny, Silly\" p.save p.reload.tag_list.to_s # \"Funny, Silly\" p.tag_list.add(\"Great\", \"Awful\") p.tag_list.remove(\"Funny\")
    14. Post.find_tagged_with('Funny, Silly') Post.find_tagged_with('Funny, Silly', :match_all => true) User.find(:first).posts.tag_counts .map{|t| \"#{t.name}(#{t.count})\"}
    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. http://www.yotabanana.com/hiki/ja/ruby-gettext.html
    17. # gem install gettext
    18. $KCODE=’u’ require 'gettext/rails' init_gettext \"example\" # po
    19. lang=ko lang=ja msgid \"message\" msgstr \" \" msgid \"Message|Text\" msgstr \" \"
    20. http://d.hatena.ne.jp/secondlife/20070207/1170835130
    21. http://www.yotabanana.com/hiki/ja/ruby-gettext-howto-ror.html
    22. http://jpmobile-rails.org/
    23. http://blog.netswitch.jp/articles/tag/rails_plugin
    24. http://andworkspace.net/
    25. http://agilewebdevelopment.com/plugins/top_rated
    26. http://www.railsify.com/

    + daradara, 2 years ago

    custom

    4414 views, 5 favs, 2 embeds more stats

    Ruby勉強会@札幌-5

    More Info

    © All Rights Reserved

    Go to text version
    • Total Views 4414
      • 4054 on SlideShare
      • 360 from embeds
    • Comments 0
    • Favorites 5
    • Downloads 162
    Most viewed embeds
    • 342 views on http://d.hatena.ne.jp
    • 18 views on http://fairyware.jp

    more

    All embeds
    • 342 views on http://d.hatena.ne.jp
    • 18 views on http://fairyware.jp

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as innappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel

    Categories

    Groups / Events