- https://github.com/bborn/communityengine/blob/master/app/models/message.rb
- https://github.com/mailboxer/mailboxer/blob/master/app/models/mailboxer/conversation.rb
- https://github.com/LTe/acts-as-messageable/blob/master/lib/generators/acts-as-messageable/migration/templates/migration.rb
- https://github.com/evrone/inboxes/blob/master/lib/generators/inboxes/templates/install.rb
- https://github.com/jongilbraith/simple-private-messages/blob/master/lib/private_message_extensions.rb
- https://github.com/ging/social_stream/blob/master/base/app/models/contact.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Digg Reader open in background tab | |
// @namespace http://deeeki.com/ | |
// @include https://digg.com/reader/* | |
// @version 0.1.0 | |
// @description A port of "LDR open in background tab" for Digg Reader | |
// ==/UserScript== | |
(function(window, load) { | |
if (this.chrome && !load) { |
- (管理人の)自分に質問くるの、それで食べてないし、うざいときある
- 役割を与えることによってその場にいる意味を与えてしまう
- いいこともあるけど足かせにもなる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#for RHEL distributions | |
namespace :httpd do | |
namespace :deploy do | |
set :local_src_path, "#{Dir.pwd}/config/httpd/conf.d" | |
set :remote_src_path, "#{shared_path}/httpd/conf.d" | |
set :remote_dest_path, '/etc/httpd/conf.d' | |
task :default, :roles => :web do | |
transaction do | |
on_rollback do |
-
legacy wild controller route ':controller(/:action(/:id))(.:format)' は使わない派
-
利用するURLを明示しておきたい
-
named_route使えないとリンクの記述が冗長になるのでは
-
namespaceなど少し複雑なことをやろうとすると何かしらルーティングを書くことになり、統一感がなくなる
-
確認画面
- confirmアクションの追加
- 各アクションがすっきりする
- 新規と編集で挙動が変わる場合 (edit_confirmアクション?)
- confirmアクションの追加
-
パラメータ(mode=confirm)またはモデルの確認用プロパティ(http://bit.ly/mRQ8I5)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mechanize' | |
SITE_URL = 'http://www.hituji.jp' | |
INFO_URL = "#{SITE_URL}/comret/info" | |
a = Mechanize.new | |
links = a.get(INFO_URL).search('.searchAreaElement').at('td').search('a').map do |city| | |
city['href'] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/deeeki/dev/src/myapp/vendor/bundle/ruby/1.9.1/gems/rails_best_practices-1.6.0/lib/rails_best_practices/core/routes.rb:27:in `controller_name_with_namespaces': undefined method `camelize' for nil:NilClass (NoMethodError) | |
from /Users/deeeki/dev/src/myapp/vendor/bundle/ruby/1.9.1/gems/rails_best_practices-1.6.0/lib/rails_best_practices/reviews/remove_unused_methods_in_controllers_review.rb:82:in `block in after_review' | |
from /Users/deeeki/dev/src/myapp/vendor/bundle/ruby/1.9.1/gems/rails_best_practices-1.6.0/lib/rails_best_practices/reviews/remove_unused_methods_in_controllers_review.rb:80:in `each' | |
from /Users/deeeki/dev/src/myapp/vendor/bundle/ruby/1.9.1/gems/rails_best_practices-1.6.0/lib/rails_best_practices/reviews/remove_unused_methods_in_controllers_review.rb:80:in `after_review' | |
from /Users/deeeki/dev/src/myapp/vendor/bundle/ruby/1.9.1/gems/rails_best_practices-1.6.0/lib/rails_best_practices/core/check.rb:224:in `block (2 levels) in included' | |
from /Users/deeeki/dev/src/myapp/vendor/bundle/ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class wp_atnd_widget extends WP_Widget { | |
//クラスメソッド | |
static public function register() { | |
register_widget('wp_atnd_widget'); | |
} | |
//... | |
} | |
//クラスメソッドでフック | |
add_action('widgets_init', array('wp_atnd_widget', 'register')); |
NewerOlder