é座Rails#26ã®ç»å£è³æã§ã https://ginza-rails.connpass.com/event/189892/
æè¿ããã¼ãã§ã¯ãRuby on Railsã®å¢è£æ¹è¨çããªãªã¼ã¹ããã¦ããã ãã身ãªã®ã§ãä¹ ãã¶ãã«Railsã«ã¤ãã¦æ¸ãã¦ã¿ããã¨æãã ã¾ããæ¸ç±ã®å®£ä¼ã¿ãããªãã®ã§ãã æ°æ¥åã«ãnoteã¨ãããµã¼ãã¹ã§Webããã³ãå´ã«æ稿è ã®IPã¢ãã¬ã¹ãé²åºããã¨ããæ¼æ´©äºæ ãèµ·ãã¾ããããããã©ããããåé¡ãã¯ä¸æ¦ç½®ãã¦ããã¦ãä½æ ãããããã¨ã«ãªãã®ããããã¦Railsã§ãã使ãããdeviseã¨ããèªè¨¼æ©æ§ä½æã©ã¤ãã©ãªã®ããè¯ã使ãæ¹ã«ã¤ãã¦è©±ããã¦ããã¾ãã (noteãRailsã使ã£ã¦ããããããã§è©±ãããdeviseãæ¡ç¨ãã¦ãããã¯å®ãã§ã¯ãªãã®ã§ãããããå ã®è©±ã¯ãã®äºæ ã¨ã¯ç´æ¥é¢ä¿ããã¾ãããRailsã ã£ãã¨ãã¦ãæãã使ã£ã¦ãªããå¤ãªä½¿ãæ¹ãã¦ãã¨æããã§ãããçç±ã¯å¾è¿°) ä½æ ãããªãã¨ãèµ·ããã®ã ãããããããã³ãå´ã«ä½æ IPã¢ãã¬ã¹ãéã£ã¦ãã ãã¨ãã話ã§ã
ããã³ã¾ãã¯ãRuby ã«é¢ããæè¡è¨äºã¯ãã¡ããã®ãã¨ãRubyist ã¸ã®ã¤ã³ã¿ãã¥ã¼ãã¨ãã»ã¤ããã®ä»ããå±ãããã¦ã§ãéèªã§ãã Rubyist Magazine ã«ã¤ã㦠ãRubyist Magazineããç¥ãã¦ããã³ã¾ãã¯ãRubyist ã® Rubyist ã«ãããRubyist ã¨ããã§ãªã人ã®ããã®ã¦ã§ãéèªã§ãã ææ°å· Rubyist Magazine 0064 å· ããã¯ãã³ãã¼ Rubyist Magazine 0064 å· Rubyist Magazine 0063 å· Rubyist Magazine 0062 å· Kaigi on Rails ç¹éå· RubyKaigi Takeout 2020 ç¹éå· Rubyist Magazine 0061 å· Rubyist Magazine 0060 å· RubyKaigi 2019 ç´åç¹éå· Rubyist
Railsã®ãããã°ç¨éã®Gem12åã«ã¤ãã¦æ¦è¦ã調ã¹ã¾ãã better-errors binding_of_caller hirb hirb-unicode pry-byebug pry-doc pry-rails pry-stack_explorer quiet_assets rack-mini-profiler tapp view_source_map ãããã°ç¨éã®Gemã¯Gemfileã®:developmentã°ã«ã¼ãã«ç»é²ãã¾ãã group :development do gem 'better_errors' gem 'binding_of_caller' gem 'hirb' gem 'hirb-unicode' gem 'pry-byebug' gem 'pry-doc' gem 'pry-rails' gem 'pry-stack_explorer' gem 'q
Gemfile ã® ãgroup :test, :development doããããã¯ã«æ¸ãã¦ãã å人çã«æå¼·ãªè¨å® ãæãããã¨æãã¾ãã(2013/10/24 ç¾å¨) ä½æ¥ç°å¢ Ruby 2.0.0p247 Rails 4.0.0 Gemfileã«è¨å®ãã¦ããå 容 â» ã³ã¡ã³ãã«éæå¤æ´ãããã®ã追è¨ãã¾ãã¼ group :test, :development do gem 'pry-rails' gem 'pry-doc' gem 'pry-stack_explorer' if RUBY_VERSION >= '2.0.0' gem 'pry-byebug' else # 以ä¸ã¯Ruby1.9ã®æã®ã¿ä½¿ã(pry-byebugã®ä»£ããã«) # debuggerã¯1.9以ä¸ã§ããåä½ããªã, remote 㯠byebug ã§ä½¿ããªãããã«ãªã£ã gem 'pry-debugger
ããã³ã¾ãã¯ãRuby ã«é¢ããæè¡è¨äºã¯ãã¡ããã®ãã¨ãRubyist ã¸ã®ã¤ã³ã¿ãã¥ã¼ãã¨ãã»ã¤ããã®ä»ããå±ãããã¦ã§ãéèªã§ãã Rubyist Magazine ã«ã¤ã㦠ãRubyist Magazineããç¥ãã¦ããã³ã¾ãã¯ãRubyist ã® Rubyist ã«ãããRubyist ã¨ããã§ãªã人ã®ããã®ã¦ã§ãéèªã§ãã ææ°å· Rubyist Magazine 0064 å· ããã¯ãã³ãã¼ Rubyist Magazine 0064 å· Rubyist Magazine 0063 å· Rubyist Magazine 0062 å· Kaigi on Rails ç¹éå· RubyKaigi Takeout 2020 ç¹éå· Rubyist Magazine 0061 å· Rubyist Magazine 0060 å· RubyKaigi 2019 ç´åç¹éå· Rubyist
Railsã§ããã°ã©ã ãæ¸ããã¨SQLãç´æ¥è¨è¿°ããæ©ä¼ãæå¤ã¨å¤ãã®ã§ã ãªãã¹ãRubyãããæ¸ãæ¹æ³ããªãã調ã¹ã¦ã¿ã¾ããã ORãªã©ããªãåºæ¬çãªæ§æã§ãarel_tableã使ãå¿ è¦ãããã®ã§ããã ã¨ããããã§ãArel::Table ã使ã£ã¦ã¿ã¾ããã åä½ç¢ºèªç°å¢ã¯ä»¥ä¸ã®éãã§ãã ruby: 1.9.3-p392 Rails: 3.2.13 arel: 3.0.2 MySQL: 5.1.65 æ¤ç´¢æ¡ä»¶ãORã§ç¹ããã åºæ¬çãªæ§æã§ããSQLãç´æ¥è¨è¿°ããå ´åãå¤ãã®ã§ã¯ãªãã§ããããï¼ User.where("name = ? OR name = ?", "太é", "è±å").to_sql #=> "SELECT `users`.* FROM `users` WHERE (name = '太é' OR name = 'è±å')" ãªãã¹ãRubyã§æ¸ããã¨ããã¨ãããª
å¹³ç´ ããQAï¼ ITããå©ç¨ããã ããèª ã«ãããã¨ããããã¾ãã QAï¼ ITã¯ã質åãåçããå ±æãããç·¨éããã¦ãããã¨ã§ãã¹ããªQAãèç©ã§ãããITã¨ã³ã¸ãã¢ã®ããã®åé¡è§£æ±ºã³ãã¥ããã£ã¼ãã¨ãã¦ç´7å¹´ééå¶ããã¦ãã¾ãããããã¾ã§ãµã¼ãã¹ãç¶ãããã¨ãã§ããã®ã¯ãQAï¼ ITã®ã³ã³ã»ããã«å ±æãããã ããé©åãªè³ªåãåçããå¯ãããã ããçãã¾ã®ãæ¯æ´ããã£ãããããã¨èãã¦ããã¾ããéãã¦å¾¡ç¤¼ç³ãä¸ãã¾ãã ããããªãããã¨ã³ã¸ãã¢ã®æ å ±å ¥ææ¹æ³ã®å¤æ§åãQAãµã¼ãã¹å¸å ´ã®ç¶æ³ãï¼ ITã®ä»å¾ã®ã¡ãã£ã¢éå¶æ¹éãªã©ãæ¤è¨ããçµæã2020å¹´2æ28æ¥ï¼éï¼15:00ããã¡ã¾ãã¦QAï¼ ITã®ãµã¼ãã¹ãçµäºãããã¨ã«ãã¾ããã ããã¾ã§ãå©ç¨ãããã ãã¾ããçãã¾ã«ã¯æ®å¿µãªãç¥ããã¨ãªããèª ã«å¿è¦ããæã£ã¦ããã¾ããä½ã¨ãããç解ãããã ãã¾ãã¨å¹¸ãã§ãã QAï¼ ITã®7å¹´éã§çãã¾ã®ç¥è
ActiveRecord4ã§ãããªSQLã¯ã¨ãªã©ãæ¸ãã®ï¼ Mergeç·¨ ã§ã¯ãé¢é£å ã®scopeã使ããã¨ãã§ããmergeãç´¹ä»ãã¾ãããmergeã使ãäºã§ãå¤æ´ã«å¼·ãã¯ã¨ãªãç¾ããçµã¿ç«ã¦ããã¨ãã§ãã¾ããã ä»åã¯ãActiveRecord4ã§æ¸ãã«ããSQLã¯ã¨ãªãã¡ãç´¹ä»ãã¾ãã æ¸ãã«ããã¯ã¨ãªã¨ã¯ãå ·ä½çã«ã¯ä»¥ä¸ã®ãã®ãããããã¾ãã æ¯è¼æ¼ç®ORlikeleft outer joinunionãµãã¯ã¨ãªexists ActiveRecordã§ãããã®ã¯ã¨ãªãçµã¿ç«ã¦ãå ´åãã©ããã¦ãç¾ãããªãï¼SQLæååãã¹ã£ããæ¸ãã¦ãã¾ããããªï¼æ¸ãæ¹ã¨ãªã£ã¦ãã¾ããã¡ã§ãã ãã®å¦çãç¾ããæ¸ãããã«ã¯ãActiveRecordã ãã®æ©è½ã§ã¯è¶³ãããActiveRecordãå é¨ã§ä½¿ã£ã¦ããArelã¨ããã©ã¤ãã©ãªã使ãå¿ è¦ãã§ã¦ãã¾ãã ä»åã¯ãArelã使ã£ã¦è¯éºã«SQLã¯
2011å¹´08æ25æ¥16:55 ã«ãã´ãªrailsactiverecord Rails3ã®ActiveRecodeã§è¤æ°ã®whereæ¡ä»¶ãORã§æ¸ã Rails3ã«ãªã£ã¦ããArelãå°å ¥ããã¦named_scopeã便å©ã ãªããã¨æãã¤ã¤ããwhereæ¡ä»¶ãORã§æ¥ç¶ããã«ã¯ã©ãããã ï¼ã£ã¦ ãã¨ã§èª¿ã¹ã¦ã¿ãã â ä»åã®è¦ä»¶ 1.Employeeãã¼ãã«ããååï¼æ¼¢åï¼ã§æ¤ç´¢ã§ããã 2.Employeeãã¼ãã«ããååï¼ã«ãï¼ã§æ¤ç´¢ã§ããã 3.ã«ãã§ãæ¼¢åã§ãæ¤ç´¢ã§ããã 4.æ¤ç´¢å¯¾è±¡ãã£ã¼ã«ãï¼å§ãåãã»ã¤ãã¡ã¤ï¼ãåçã«æå®ã§ããã ä¾ãã°Employeesãã¼ãã«ã以ä¸ã®ããå ´å class CreateEmployees < ActiveRecord::Migration def self.up create_table :employees do |t| t.string
ã¯ããã« RSpecã使ã£ã¦ãã¹ããè¨è¿°ãã¦ããéããã¹ãã®å®è¡åã«ãã¼ã¿ããã¼ãã«ã«ç»é²ãã¦ããããã±ã¼ã¹ãå¤ã ãããã¨æãã¾ããRSpecå ã§ActiveRecordã使ã£ã¦ãã¼ã¿ãç»é²ãããã¨ãã§ãã¾ãããè¤æ°ã®ãã¹ãã±ã¼ã¹ã§åããã¼ã¿ã使ãããå ´åããã¼ã¿ã®å®ç¾©ã¯ä¸ç®æã§è¡ãããã¨ããã§ãã ãã®æ§ãªå ´åãFactory Girlã使ç¨ããã¨ãä¸ç®æã§ãã¹ããã¼ã¿ãå®ç¾©ã§ãã¾ããä»åã¯ãã®FactoryGirlã®ä½¿ãæ¹ã«ã¤ãã¦æ¸ãããã¨æãã¾ãã 使ãæ¹ ä½¿ãæ¹ã®å¤§ã¾ããªæµãã¨ãã¦ã¯ã FactoryGirlã使ç¨ã§ããããã«ãã å®ç¾©ãã¡ã¤ã«ã«ãã¼ã¿ãå®ç¾©ãã å¿ è¦ã¨ãããã¹ãã±ã¼ã¹ã«ã¦ãã¡ã¤ã«ãèªã¿è¾¼ã¿ããã¼ã¿ãé©æå å·¥ãã¦ç»é²ãã ã¨ããæãã¨ãªãã¾ããå°ããã®å®ç¾©ãããã¼ã¿ããFactoryãã¨ãè¨ãã¾ãã以ä¸ãæé ã§ãã 1.Gemfile Gemfileã«ä»¥ä¸ãè¨è¿°ãã
Rails Girls ã¬ã¤ã ãããã®ã¬ã¤ãã¯ã女æ§ããã¯ããã¸ã¼ãã¢ã¤ãã£ã¢ãå½¢ã«ããæ¹æ³ãç解ããããã®ãã¼ã«ãã³ãã¥ããã£ãæä¾ããããä½ããã¦ãã¾ããèªåã®ã¤ãã³ããéå¶ããããæ°ããã¬ã¤ããææ¡ãããããããã¯åã«Railsãå¦ã¶ããã«ä½¿ããã¨ãã§ãã¾ãããã£ã¨Rails Girlsã«é¢ããããã¨æã£ãããRails Girls Teamã¡ã¼ãªã³ã°ãªã¹ã(è±èª) ã«åå ãã¦ãã ããã Rails Girlsã®ã¤ãã³ãã«ã¤ãã¦ãã£ã¨ç¥ãããã§ããï¼: Rails Girlsã®ã¤ãã³ã ã³ã¼ãã ã£ãããã¯ã¼ã¯ã·ã§ãããä¼ç»ãããã¨ãã¦ãã¾ããï¼ãã¡ããè¦ã¦ã¿ã¦ãã ãã: Rails Girlsã®ã¬ã¤ã Guides in other languages Rails Girls Official site Guides in English Guides in French Guid
Ruby on Railsã§Devç°å¢ã¯ä½¿ã£ããã¨ãããã©ãtestã»prodç°å¢ãèæ ®ããç°å¢æ§ç¯ããããã¨ããªã人ã«ãå§ãã®å 容ã§ãã ##ãµã¼ãã¼æ§æå³ ##ãµã¼ãã¼ã®å½¹å² ###ãªãã¼ã¹ãããã·ãµã¼ãã¼(ãã¹ãåï¼rp01ï¼ ãã¼ããã©ã³ãµæ©è½ã使ã£ã¦WEBãµã¼ãäºå°ã«å¦çãæ¯ãåããã¢ã¯ã»ã¹ãï¼å°ã®ãµã¼ãã¼ã«éä¸ãããªã WEBãµã¼ãã¼ãå¤é¨ããé ãããã¨ã§ã»ãã¥ãªãã£é¢ã®åä¸ ###WEBãµã¼ãã¼ï¼web01ãweb02ï¼ webãµã¼ãã¼ãï¼å°ç¨æãããã¨ã§ã¢ã¯ã»ã¹ãï¼ã¤ã®ãµã¼ãã¼ã«éä¸ããªããããã¬ã¹ãã³ã¹ãæ©ãã§ãã ###ãã¹ã¿ã¼DBãµã¼ãã¼ï¼db01mï¼ DBå 容ãããï¼å°ã®DBãµã¼ãã¼ï¼ã¹ã¬ã¼ãï¼ã¸ãªã¢ã«ã¿ã¤ã ã«ã³ãã¼ããé害ã§ãã¹ã¿ã¼ãåæ¢ããã¨ãã¯ã¹ã¬ã¼ãã«åãæ¿ãã ###ã¹ã¬ã¼ãDBãµã¼ãã¼ï¼db01sï¼ èªã¿è¾¼ã¿å°ç¨ã®ãµã¼ãã¼ãæ¸ãè¾¼ã¿ãããªãåã¬ã¹ãã³ã¹ã
ã¯ããã« ãµã³ãã«ã¢ããªçãä½æããéããã¶ã¤ã³ã«æ©ããã¨ã¯å¤ããã¨æãã¾ãã (ç¹ã«ãã¶ã¤ã³ã»ã³ã¹ã«ä¹ããç§ã®ãããªããã°ã©ãã¯ã»ã»ã») ãã®ãããªæã«ãBootstrapã¯å¼·ãå³æ¹ã¨ãªãã¾ãã(ä»æ´æã¯å¼·ãã§ããã»ã»ã») ã¾ãBootstrapã«ã¯ãã¶ã¤ã³ã®ãµã³ãã«ãç¨æããã¦ããã®ã§ããã®ãµã³ãã«ããã¼ã¹ã¨ãã¦ã¢ããªãä½ã£ã¦ããã°ãã¶ã¤ã³ã«ã¤ãã¦æ©ããã¨ãæ¸ãããã¨ãã§ãããã§ãã ä»åã¯Ruby on Rails 4 ã«Bootstrap3ãé©ç¨ãããµã³ãã«ã«ãããStarter templateãã¨åããã¼ã¸ãä½ã æé ã«ã¤ãã¦çºãã¦ã¿ããã¨æãã¾ãã ä½æ¥æé 以ä¸ã«ãä»åã®ä½æ¥æé ãæ¸ãã¦ããã¾ãã 1.ãã¼ã¸ä½æ ã¾ãã¯Ruby on Railsã«ã¦ãä»å表示ãããã¼ã¸ãä½æãã¾ãã ã³ã³ããã¼ã©ããã¥ã¼ã®ä½æ ä»å表示ããç»é¢ã®ã³ã³ããã¼ã©ã¯ãwelcomeãããã¥ã¼ã¯ã
ããã«ã¡ã¯ãé´æ¨ã§ãã ä¸è¦§ç»é¢ã«ã<< | < | 1 | 2 | 3 .. 10 | 11 | 12 ... 98 | 99 | 100 | > | >>ãã®ãããªãªã³ã¯ãä»ãã¦ãããã¨ã¯å¤ãã§ããã ãã¼ã¸ã³ã°ããã¼ã¸ãã¼ã·ã§ã³ããã¼ã¸ã£ã¼ãã»ã»ã»ãªã©ã¨å¼ã³æ¹ã¯è²ã ããã¾ãããããã§ã¯ããã¼ã¸ã³ã°ãã¨å¼ã¶ãã¨ã«ãã¾ãã ä»åã¯ãã¼ã¸ã³ã°ãå®ç¾ããã©ã¤ãã©ãª kaminari ããç´¹ä»ãã¾ãã kaminari (https://github.com/amatsuda/kaminari) kaminari ã®å°å ¥ Gemfile ã«ä»¥ä¸ã®è¡ã追å ãã¾ãã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}