Slides for Ruby on Ales 2015 talk "The Recipe for the World's Largest Rails Monolith" https://ruby.onales.com/speakers#therecipefortheworldslargestrailsâ¦
Rubyã«ã¯Gemã¨å¼ã°ãããµã¼ããã¼ãã£ã®ã©ã¤ãã©ãªãè±å¯ã«åå¨ãã¾ãã Gemã¯å¤§å¤ä¾¿å©ãªãã®ã§ãããããæ©è½ã»ãããªã¨æã£ãéã« The Ruby Toolbox ã RubyGems.org ã Google ã§æ¤ç´¢ããã¨å¤§æµèª°ãããã®æ©è½ãæã£ãGemãä½ã£ã¦ããããã¾ãã gemãå©ç¨ããã®ããRubyGems.orgã«ç»é²ããã¦ãããã®ãªãã° ã¨å ¥åãããã¨ã§å©ç¨å¯è½ã¨ãªãã¾ãã Gemã¯ã ãã§ãç°¡åã«éçºã§ãã審æ»ç¡ãã§ããã«å ¬éã§ãããããæ¥ã 大éã®Gemãã¡ãRubyGems.orgã«ç»é²ããã¦ãã¾ããåé¢ãé·å¹´ä¿å®ããã¦ããªãGemãå質ã®ä½ãGemã大éã«RubyGems.orgã«ç»é²ããã¦ããã®ãç¾ç¶ã§ãã åãæ©è½ãæã£ãGemã大éã«ç»é²ããã¦ããããã¦ãã©ã®ã©ã¤ãã©ãªãå©ç¨ãã¦ããã®ãè¿·ãäºãå¤ã ããã¾ãã ä»åã¯å¼ç¤¾ããã¸ã§ã¯ãã§å®éã«å©ç¨ãã¦ããã便å©ãª
Husband, father, designer & developer, photographer, fly-fisherman, secret admirer of interior design, and proprietor of a silly, and sometimes awkwardly juvenile, monicker. Twitter: @mrpunkin | Flickr: mrpunkin | Dribbble mrpunkin Using Arel for SQL functions If you are anything like me you understand that sometimes there are things you want to do a certain way, simply because you want to underst
ActiveRecord4ã§ãããªSQLã¯ã¨ãªã©ãæ¸ãã®ï¼ Mergeç·¨ ã§ã¯ãé¢é£å ã®scopeã使ããã¨ãã§ããmergeãç´¹ä»ãã¾ãããmergeã使ãäºã§ãå¤æ´ã«å¼·ãã¯ã¨ãªãç¾ããçµã¿ç«ã¦ããã¨ãã§ãã¾ããã ä»åã¯ãActiveRecord4ã§æ¸ãã«ããSQLã¯ã¨ãªãã¡ãç´¹ä»ãã¾ãã æ¸ãã«ããã¯ã¨ãªã¨ã¯ãå ·ä½çã«ã¯ä»¥ä¸ã®ãã®ãããããã¾ãã æ¯è¼æ¼ç®ORlikeleft outer joinunionãµãã¯ã¨ãªexists ActiveRecordã§ãããã®ã¯ã¨ãªãçµã¿ç«ã¦ãå ´åãã©ããã¦ãç¾ãããªãï¼SQLæååãã¹ã£ããæ¸ãã¦ãã¾ããããªï¼æ¸ãæ¹ã¨ãªã£ã¦ãã¾ããã¡ã§ãã ãã®å¦çãç¾ããæ¸ãããã«ã¯ãActiveRecordã ãã®æ©è½ã§ã¯è¶³ãããActiveRecordãå é¨ã§ä½¿ã£ã¦ããArelã¨ããã©ã¤ãã©ãªã使ãå¿ è¦ãã§ã¦ãã¾ãã ä»åã¯ãArelã使ã£ã¦è¯éºã«SQLã¯
Something went wrong! Hang in there while we get back on track Writing an API is almost a given with modern web applications. Iâd like to lay out some simple guidelines and best practises for Rails API testing. We need to determine what to test and why it should be tested. Once weâve established what we will be writing tests for, we will set up RSpec to do this quickly and easily. Basically weâll
ï¼ãã®è¨äºã¯ Ruby Advent Calendar jp:2010ã® 15 æ¥ç®ã§ããåæ¥ã¯ tomohiro68 ããã§ãããï¼ Arelã¨ã¯ Arelã®æ¦è¦ã«ã¤ãã¦ã¯@a_matsudaããã®gihyoã®è¨äºãåç §ãã¦ãã ããã http://gihyo.jp/dev/serial/01/ruby/0043 ã¯ããã« æ±ãRDBã¯SQlite3ã§ãã ä¾ã¨ãã¦ä»¥ä¸ã®ãããªã¹ãã¼ããæã£ããã¼ãã«ãåãæ±ããé²ãã¦ããã¾ãã class CreateBooks < ActiveRecord::Migration def self.up create_table :books do |t| t.string :name t.string :category t.timestamps end end def self.down drop_table :books end end åºæ¬çãª
å¹³ç´ ããQAï¼ ITããå©ç¨ããã ããèª ã«ãããã¨ããããã¾ãã QAï¼ ITã¯ã質åãåçããå ±æãããç·¨éããã¦ãããã¨ã§ãã¹ããªQAãèç©ã§ãããITã¨ã³ã¸ãã¢ã®ããã®åé¡è§£æ±ºã³ãã¥ããã£ã¼ãã¨ãã¦ç´7å¹´ééå¶ããã¦ãã¾ãããããã¾ã§ãµã¼ãã¹ãç¶ãããã¨ãã§ããã®ã¯ãQAï¼ ITã®ã³ã³ã»ããã«å ±æãããã ããé©åãªè³ªåãåçããå¯ãããã ããçãã¾ã®ãæ¯æ´ããã£ãããããã¨èãã¦ããã¾ããéãã¦å¾¡ç¤¼ç³ãä¸ãã¾ãã ããããªãããã¨ã³ã¸ãã¢ã®æ å ±å ¥ææ¹æ³ã®å¤æ§åãQAãµã¼ãã¹å¸å ´ã®ç¶æ³ãï¼ ITã®ä»å¾ã®ã¡ãã£ã¢éå¶æ¹éãªã©ãæ¤è¨ããçµæã2020å¹´2æ28æ¥ï¼éï¼15:00ããã¡ã¾ãã¦QAï¼ ITã®ãµã¼ãã¹ãçµäºãããã¨ã«ãã¾ããã ããã¾ã§ãå©ç¨ãããã ãã¾ããçãã¾ã«ã¯æ®å¿µãªãç¥ããã¨ãªããèª ã«å¿è¦ããæã£ã¦ããã¾ããä½ã¨ãããç解ãããã ãã¾ãã¨å¹¸ãã§ãã QAï¼ ITã®7å¹´éã§çãã¾ã®ç¥è
ã¡ãã£ã¨ç ½ãæ°å³ã®ã¿ã¤ãã«ã«ãã¦ã¿ã¾ããããRailsã§éçºããæã¯æèçã«OOPã«å¯ããªãã¨ãªãã¸ã§ã¯ãã®åãæ´»ãããªããªããã£ã¦ãã¨ã¨ãRailsãæä¾ãã¦ããã¯ã©ã¹ã®è²¬åãåå²ãããã¨ãæ¯æ´ãã¦ãããæ©è½ã«ã¤ãã¦è©±ããã¾ãã ActiveRecordã®æ§è³ª Railséçºã«ããã¦ã¯ãã¢ãã«å±¤ã«ãã¸ãã¯ãæ¸ãã¦ã³ã³ããã¼ã©ã¼ã¯èããããã¨ããã®ã¯ãã¤ããè¨ããã¦ããã®ã§ãæ¦ã浸éãã¦ãã¦ããã¨æãã¾ãã ããã«å ãã¦ãæè¿ç§ãçµæ§ãã¤ãã主張ãã¦ããããã®ããã¢ãã« = ActiveRecordã§ã¯ç¡ãããã¨ãããã¨ã§ãã ActiveRecordã¯æãç«ã¡ããè¨ãã¨ããã¸ãã¯ã¨DBã¸ã®æ°¸ç¶åãã¾ã¨ãã¦ã«ãã»ã«åããã¢ã¼ããã¯ãã£ãã¿ã¼ã³ããæ¥ã¦ãã¾ãã(詳ããã¯ã¨ã³ã¿ã¼ãã©ã¤ãºã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ããã¯ãã£ãã¿ã¼ã³ã¨ããæ¸ç±ãèªãã¨è¯ãã§ã) ãã®æ¹æ³ã¯ãã¸ãã¯ãè¤éã§ãªãå ´åãã¤ã¾
In response to the latest Ruby on Rails security announcement we upgraded all of our clientsâ Rails projects in less than 36 hours. On average it took around 30 minutes to upgrade a project from checkout to deployment. On Twitter we mentioned our âminimal dependency policyâ in projects as being one of the reasons we could move so quickly. We got some questions about what that means exactly. First
ãããã§ããRubyKaigi 2013ã®ä¼å ´ããããã«ã¡ã¯ã ç¾å¨ãå¼ç¤¾ã§éçºä¸ã®qnypã¨ãããµã¼ãã¹ã¯ãå°ãåã«Rails 3.2.13ããRails 4.0.0.rc1ã¸ã¨ã¢ãããã¼ããè¡ãã¾ããï¼ãµã¼ãã¹èªä½ã¯ã¾ã éå ¬éãªã®ã§ã¢ã¯ã»ã¹ã¯ã§ãã¾ããï¼ã ãã®ã¢ãããã¼ãä½æ¥ãéãã¦ã Railsã«ä¾åããgemãæ¸ããã¦ãã JavaScriptã©ã¤ãã©ãªãã©ããããã ãã®gemã使ããªãããã«ãã ã¨ããç¹ã«ã¤ãã¦éè¦ããããã«ãªãã¾ããã 1. Railsã«ä¾åããgemãæ¸ããã¦ãã ç¹ã«ActiveRecordãªã©Railsã®å é¨ã«æ·±ãé¢ãããããªgemã«ããã¦ãRailsã®ã¡ã¸ã£ã¼ã¢ãããã¼ãæã®å¯¾å¿é度ãè¿ éã§ã¯ãªããããªãã®ããã£ããããã§ããã ããããã®gemãå©ç¨ããªãããã«ãªãã¾ãããä¾ãã°auditedã¯ãç¾æç¹ã®ææ°çãactiverecord ~> 3.0
æ´æ°æ å ±: 2013/11/19: åçå ¬é 2021/01/08: 訳æè¦ç´ããè¿½è¨ ããã«ã¡ã¯ãhachi8833ã§ããä»åã¯ãèªåãç¥ãããã£ããActive Recordã¢ãã«ã®ãªãã¡ã¯ã¿ãªã³ã°ã«é¢ããè¨äºã翻訳ãããã¾ããã1å¹´åã®è¨äºãªã®ã§Rails 3ãåæã§ãããRails 4以éã§ãåºæ¬çã«ã¯å¤ãããªãã¨æãã¾ãããªã³ã¯ã¯å¯è½ãªãã®ã«ã¤ãã¦ã¯æ¥æ¬èªã®ãã®ã«ç½®ãæãã¦ãã¾ãã ãªããããã§ãç´¹ä»ãããªãã¸ã§ã¯ãã¯ãapp以ä¸ã«ãããã以ä¸ã®ããã«ãã©ã«ãã追å ãã¦ããã«é ç½®ãã¾ãã 注è¨: 以ä¸ã¯ä½¿ãããããªãã©ã«ããåæããã ãã§ãããå®éã«ã¯ãã®ä¸é¨ãã使ãã¾ããã Value Object Service Object Form Object Query Object View Object Policy Object Decorator â è¥å¤§åããActive
Railsã§ãã¡ã¤ã«ã®ãã¦ã³ãã¼ãã«ä½¿ãsend_dataã§ãããæ¥æ¬èªãã¡ã¤ã«ããã¦ã³ãã¼ããããã¨ããã¨æååããã¦ãã¾ãã ããããã°ã°ã£ã¦ã¿ã¦ãããæ¹æ³ãè¦ã¤ãããã«è¦å´ããã®ã§ã¡ã¢ãã¦ããã¾ãã ä¼¼ããããªãã¨ã確ãRedmineã§ã§ãã¦ãããªãã¨ãããã¨ã§Redmineã®ã³ã¼ããèªã¿è§£ãã¦ããããããã¾ããã def filename_for_content_disposition(name) request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name end url_encodeã®é¨åã§ããã©ãããæååãã¨ã³ã³ã¼ãããé¢æ°ã®ããã§ãã å®éã«çµã¿è¾¼ãã§ã¿ãã¨ãããªæãã send_data(data, :filename => ERB::Util.url_encode(file
module ActionController module DataStreaming def send_file_headers_with_utf8!(options) send_file_headers_without_utf8!(options) match = /(.+); filename="(.+)"/.match(headers['Content-Disposition']) encoded = URI.encode_www_form_component(match[2]) headers['Content-Disposition'] = "#{match[1]}; filename*=UTF-8''#{encoded}" unless encoded == match[2] end alias_method_chain :send_file_headers!, :utf8
Railsã¢ããªã±ã¼ã·ã§ã³ã§ç°¡åã«èªåã§ä½ã£ã404/500ã¨ã©ã¼ãã¼ã¸ã表示ãããæé ã§ãã404/500ã¨ã©ã¼ãã¼ã¸ãã¦ã¼ã¶ã¼ããªãã£ã®é¢ãã³ã³ãã¼ã¸ã§ã³ã®é¢ã§é常ã«éè¦ã§ãããï¼ ããRailsã¢ããªã±ã¼ã·ã§ã³ã§ã«ã¼ãã£ã³ã°ç³»ã®ã¨ã©ã¼ã¯ã«ã¼ãã«ãªãã¤ã¬ã¯ãããããã«ãã¦ããã®ã§ãããSEOçã«ã¯NGã ã¨ç¥ãã¾ããã ãã½ãã404ã¨ã©ã¼ãã¨å¼ã°ãã¦ãããã«ã¼ãã£ã³ã°ããªãã®ã«404ã¹ãã¼ã¿ã¹ãè¿ããªãã®ã¯æ¤ç´¢ã¨ã³ã¸ã³ããçã«ã¯ãªã¯ã ããã§ãã ã¨ãããã¨ã§ãWebãµã¼ãã¹ãä½ãã¨ãã«ã¯ã«ã¼ãã£ã³ã°ã¨ãã¨ã©ã¼æã®æåããã£ããå¶å¾¡ããã»ããããã¨åçä¸ã§ãã
miyagawaããã®Podcast Rebuild: 19ã§Kibanaã®è©±ããã£ã¦ã¡ãã£ã¨çãä¸ããå§ãã¦ãã®ã§ãç°¡åã«åä½ã試ãããµã³ãã«ã¢ããªã»ãããä½ã£ã¦ã¿ã¾ããã https://github.com/y310/kibana-trial git cloneãã¦READMEã«æ¸ãã¦ããæé ãå®è¡ãã¦ããã¨å¤§ä½åãã¨æãã¾ãã railsããfluentdã«ãã°ãéãé¨åã¯ããããªæãã§rack middlewareã使ã£ã¦éãã¾ãã # application_controller.rb class ApplicationController < ActionController::Base around_filter :collect_metrics def collect_metrics yield # ensureã使ãã®ã¯ä¾å¤æã®ãã°ãææãããã ensure # co
2013å¹´12æ2æ¥æ´æ°: åç §ããããã¨ãå¤ãã®ã§ Rails 4 ã®æ å ±ã訳注ã¨ãã¦è¿½è¨ãã¾ãããã¾ããRails 4 ã«é¢ããæ å ±ã¯ã WEB+DB PRESS Vol.73 ãé常ã«åèã«ãªãã®ã§ãä¸èªããããããã¾ãã ãã®æç« ã¯ Mitch Crowe æ°ã®ããã°ãã 2012å¹´4æ14æ¥ã®è¨äºã翻訳ãããã®ã§ãã The 10 Most Underused ActiveRecord::Relation Methods http://blog.mitchcrowe.com/blog/2012/04/14/10-most-underused-activerecord-relation-methods/ æ¨æ¥ã¯ ActiveRecord::Relation ã®ã³ã¼ãã«èã¾ã§æµ¸ãã£ã¦ã使ããã¦ããã®ãããã¾ã§å ¨ç¶è¦ããã¨ããªãé¢ç½ããã²ãããæãåºããã¦ãããããã®è¨äºã§ãååã«æ´»ç¨
require 'rubygems' require 'parallel' require 'open-uri' require 'digest/md5' urls = [ 'http://farm4.staticflickr.com/3052/3086132328_e2041be795.jpg', 'http://farm7.staticflickr.com/6053/6312937936_cebaf2feb9.jpg', 'http://farm1.staticflickr.com/54/131841577_0e67642c02.jpg', 'http://farm3.staticflickr.com/2293/2266151759_058e732577.jpg' ] Parallel.each(urls, in_threads: 2) {|url| puts "start downl
2013-06-25 Railsãããããªããå«ãã - Rails ã§ã® OO è¨è¨ã«ã¤ã㦠ruby rails æè¿ã¯ãã£ã¨ Rails æ¸ãã¦ããã§ãããæ¸ãã°æ¸ãã»ã©å«ãã«ãªã£ã¦ãããã§ãã å¦æ æçãªãã¤ãªãã§ããã Rails ããã®æªãã¨ããã°ã£ããè¦ãã¦ãã¦ãããä¸ç·ã«ããããªããã§ãã ã§ãå¥ããã»ã©ãããªãã⦠ã¨ããæç´ã«ã¿ãããã Rails ã§ã®è¨è¨ã«ã¤ãã¦ã®è°è«ã§ãã é·ããã©ã³ã¼ãã¯ä¸ååºã¦ããªãã®ã§éå¤ä¸ã«ã§ãããã§ãã ããã 注æ ä¸é¨ã«ã¯ãããè¨èé£ããã§ã¦ããã®ã§ãèªãã§ä¸å¿«ã«ãªãããããã¾ããã ä¸å¿«ã«ãªã£ãã¨ãã¦ã責任ã¯è² ãããã¾ãã 次ã®ãããªæ¹ã®æå¾ ã«æ²¿ãçµè«ã¯ã§ã¾ãããæ®å¿µã§ããã Sinatra, Padrino ã®äºº é¢æ°åã®äºº éçåä»ãã®äºº C ã®äºº TL;DR Rails ã«ã ã¾ãããªãã èªåã®éãè¦å®ããã 欺çã«ã¿ã¡ã Ra
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}