ããã«ã¡ã¯ããã¼ã±ãã£ã³ã°ãããã¯ãéçºé¨ã®é·ç°ã§ãã ãã®è¨äºã§ã¯ãç§ãç¾å¨é²ãã¦ããããã¸ã§ã¯ãã§ãWebpackerã使ã£ãJavaScriptã®ã¢ã¸ã¥ã¼ã«ç®¡çãå°å ¥ããã®ã§ãããã«ã¤ãã¦ç´¹ä»ãããã¨æãã¾ãã Webpackerã¨ã¯ Webpackerã¨ã¯ãWebpackãç¨ãã¦Railsä¸ã§JavaScriptéçºãããããã«å¿ è¦ãªä¸é£ã®æµããæä¾ãã¦ããããRails organizationã§éçºããã¦ããgemã§ãã ããã¾ã§ãRailsä¸ã§JavaScriptã®ããã±ã¼ã¸ãã©ã®ããã«ç®¡çããããã¾ããã¢ã¸ã¥ã¼ã«ä¾åãã©ã®ããã«è§£æ±ºãããã«ã¤ãã¦ãå¤ãã®é¸æè¢ããããããããã©ãçµã¿åããã¦ä½¿ãã®ãã«ã¤ãã¦æ©ã¾ããã¦ãã¾ããã ãã®ããã°ã§ãéå»ã«ä½åº¦ãè¨äºãæ稿ããã¦ããããã®ä¸ã§ãè¤æ°ã®é¸æè¢ãä¸ãããã¦ãã¾ãã webpackã使ã£ã Railsä¸ã§ã®Reactéçº
ããæ°å¹´ãè¿ãã¦2ã¶æãçµã¡ã¾ããã å¤ãã®äººã¯æ°å¹´ã®ç®æ¨ãç«ã¦ã¾ãããçããã¯ä½ãããç«ã¦ã¾ããã§ãããã? è±èªãæ¯æ¥åå¼·ããã¨ããç®æ¨ãç«ã¦ã¾ããããæ¢ã«æ«æãã¦ãã¾ã£ãã¨ã³ã¸ãã¢ã®æä¸(pipopotamasu (pipopotamasu) · GitHub)ã§ãã æ¬æ¥ã¯ãã®æºæãè¾¼ãã¦Vue.jsã¨Railsã®è©±ããéããã¾ãã ãã®è¨äºãæ¸ãèæ¯ ä»¥åããã°ã§æ¸ããéããç¾å¨Webpackerã¸ã®ç§»è¡ãæ©ã«ããã³ãã¨ã³ãå¨ãã®æ¹åãé²ãã¦ãã¾ãã tech.medpeer.co.jp ãã®ä¸ã§Vue.jsã¨Railsãããæãã«çµã¿åãããã«ã¯ã©ããããè¯ããã«ã¤ãã¦æ©ããã¨ããã£ãã®ã§ãæ¬è¨äºã«ã¦å ±æããã¦ããã ãã¾ãã æ©ãã å 容ã¨ãã¦ã¯ä»¥ä¸ã«ãªãã¾ãã 1. Ajaxéä¿¡æã«CSRFãã¼ã¯ã³ãã©ãè¨å®ããã°ããã? 2. åä¸ãã¡ã¤ã«ã³ã³ãã¼ãã³ãã§æ¸ãHTMLããã£ã¨
Fjord Boot Campã§Railså ¥éçµãã£ããããã®äººã®ããã«ãæ®éã©ããªæãã§railsã§éçºãã¦ããã®ãããã¢ããæè¦ã§ä½ãèãã¦ãããåããªããï¼æ©è½ä½ã£ã¦ã¿ãåç»ãä½ãã¾ããã é©å½ã«ã°ã°ããªããä½ã£ã¦ããæãã¨ããééã£ã¦ããã¨ãã©ããã¦ãã®ãã®é°å²æ°ãä¼ããã°ãããªã¨æãã¾ãã
ããã«ã¡ã¯ãæè¡é¨ã®å½å (@k0kubun) ã§ãã 3/28ã«ã¯ã©ã¦ãã¯ã¼ã¯ã¹ããã§è¡ãªãããRails Upgrade Casual Talksã§ãRailsã¢ããã°ã¬ã¼ãã®éã«ã¯ãã¯ããããè¡ãªã£ã¦ãã工夫ã«ã¤ãã¦ç´¹ä»ãã¾ããã å½±é¿ç¯å²ã®äºæ¸¬ãé£ããRailsã®ã¢ããã°ã¬ã¼ããå®å ¨ã«è¡ãªãããã®åä½ç¢ºèªã®ããæ¹ã«ã¤ãã¦åèã«ãªãã°ã¨ãããã¨ã§ãæ¬è¨äºã§ãæ¹ãã¦ç´¹ä»ãããã¾ãã Cookpadã®Railsã¢ããã°ã¬ã¼ãã®æµã Rails 4.1ãã4.2ã«ã¢ããã°ã¬ã¼ãããéã®ä¾ãç´¹ä»ãã¾ãã CIã«Rails 4.2ç¨ã¸ã§ããç¨æ ã¾ãã¯Rails 4.2ã«ã¢ããã°ã¬ã¼ãããããã®rails42ãã©ã³ãã§ãã¹ããéãã¾ãããªãªã¼ã¹ããã¾ã§ãã®ãã©ã³ãã¯masterããrebaseãç¶ããã®ã§ããªãªã¼ã¹ã¾ã§ãã¹ããéãç¶æ ãä¿ã¤ãããCIã«rails42ãã©ã³ãç¨ã®ã¸ã§ããç¨æãã¾
ã¿ã¤ãã«ã¯é£ãã§ãããã¿ã¾ãããRuby 3.0 ã¯ããªãå ã®å°æ¥ã®è©±ãªã®ã§ãæçµçã«ã©ããªããã¯ãããã¾ãããã§ã Ruby 3.0 ã«é大ãªå¤æ´ãäºå®ããã¦ããã®ã¯äºå®ãªã®ã§ãä¸ç·ã«èãã¦æ¬²ããã¨æãã¾ãã immutable string literal Ruby 3.0 ã§ã¯æååãªãã©ã«ãããã©ã«ã㧠immutable ï¼ç ´å£çå¤æ´ä¸å¯ï¼ ã«ãããã¨ããæ¹éãã決å®ããã¾ããã(Feature #11473: Immutable String literal in Ruby 3) ã¤ã¾ãã次ã®ãããªããã°ã©ã ãåããªããªãã¾ãã(å½ãã±ããããå°ãæ¹å¤ãã¦å¼ç¨ï¼ sql = "SELECT #{sec_id}, pt.path, st.doc_count " sql << "FROM #{stats_tablename} AS st " #### âããã§ä¾å¤: can't m
é¸å®åè£ CoffeeScript ç¾ç¶ä½¿ç¨ãã¦ãã Railsã¨ã®ç¸æ§ãããï¼ããã©ã«ãã§ãµãã¼ãããã¦ããï¼ ECMAScript 6ï¼ä»¥ä¸ãES6ï¼ æ¬¡æJavaScriptã®æ¨æºä»æ§ ES6ã¯ãã¤å§åãããã®ï¼ 2015å¹´6æäºå® ã¤ã¾ããä»æ§ã¯ã¾ã åºã¾ã£ã¦ããªãï¼ããã»ã¼ã»ã¼åºã¾ã£ã¦ããã¨è¨ã£ã¦è¯ãã¨æãããï¼ ES6ã®æ©è½ es6featuresã§æ¦è¦ãä¸è¦§ã§ãã¾ã æ¥æ¬èªçããã£ã https://github.com/yoheiMune/es6features Mozillaãåºãã¦ããéå ¬å¼ã®ES6ãã©ããä»æ§æ¸ã¯ãã¡ã ã2015 å¹´ã® JavaScript 㨠babel ã®è©±ãããHELLO, ES6 ~ããããè¿ããJSã®ãã©ã¤~ããããããããã£ã ES6ã¨CoffeeScriptã®æ©è½æ¯è¼ es6featuresã«è¨è¼ãããæ©è½ã®CoffeeScriptã§ã®å®
Akira Matsudaãããã²ã¹ãã«è¿ãã¦ãRails, Ruby, RubyKaigi ãªã©ã«ã¤ãã¦è©±ãã¾ããã ã¹ãã³ãµã¼: freee Show Notes github.com/amatsuda Asakusa.rb Seattle.rb ã¯ãã¯ãããã«ãããæè¿ã®ActiveRecordéç¨äºæ eaglemt/switch_point ä¼è¨ã½ãã freee (ããªã¼) â Rails 4.2.0 beta1: Active Job, Deliver Later, Adequate Record, Web Console Active Job Basics Call #to_s when serializing GlobalID. Fix #95 by miyagawa - rails/activejob MySQL 5.6 and later supports micro
Railsã§å¤§ããªãã¡ã¤ã«ãæ±ãéã®ãã¤ã³ããã¾ã¨ãã¦ã¿ã¾ããã åæ 大ããªãã¡ã¤ã«ã¨ã¯ ã ããã100MBï½10GBãããã®ãã¡ã¤ã«ããã¦ã³ãã¼ãã»ã¢ãããã¼ãããã®ãæ³å®ãããã¨ã«ãã¾ãã æ°MBç¨åº¦ã ã¨ãç¹å¥ãªå·¥å¤«ãªãã§ãããã»ã©åé¡ã«ãªãã¾ããã10GBãè¶ ãã¦ããã¨ãæ°ãã¤ããã¹ãç¹ãå¤ãã£ã¦ãããã¨æãã¾ãã 以ä¸ã§ã¯ä¸»ã«ãµã³ãã«ã¨ãã¦ã1GBã®ãã¡ã¤ã«ï¼ISOãã¡ã¤ã«ãZIPãã¡ã¤ã«ãªã©ï¼ãæ³å®ãã¾ãã ç°å¢ 以ä¸ã®ãããªç°å¢ãæ³å®ãã¾ãã Railsã¯4ç³» Nginx + Unicornã®ã¹ã¿ã³ãã¼ããªæ§æ ãµã¼ã1å°ã®ã·ã³ãã«ãªæ§æï¼ãã¼ããã©ã³ãµã使ç¨ããè¤æ°å°æ§æã«ã¤ãã¦ã¯ãæ«å°¾ã«å°ãè¨è¼ãã¦ãã¾ãï¼ ãã¦ã³ãã¼ã ãã¡ã¤ã«ã®ãã¦ã³ãã¼ã ã¾ãã¯ãRailsã¢ããªãã大ããªãã¡ã¤ã«ãé ä¿¡ããã±ã¼ã¹ãèãã¾ãããã ãã¨ãã°ãISOãã¡ã¤ã«ããµã¼ãå ã«ä¿åãã¦ããã¦ã
ä»æ¥ããæä½ã常ä½ã«ããã ãã¼ã¿ãã¼ã¹ã«æåãããã¼ã¿ãå ¥ãã¦ããããå ´åãRailsã§ã¯rake db:seedã使ãããã®ã¿ã¹ã¯ã«ããRailsã¢ããªã±ã¼ã·ã§ã³ããã¼ããããç¶æ ã§db/seeds.rbã«æ¸ããã³ã¼ããå®è¡ãããã ã·ã¼ãç¨ãã¼ã¿ãä½ããã¨èªä½ãéãå ´åï¼ä¾ãã°å¤é¨ã®APIãå¼ã°ãªããã°ãããªãã¨ããããããã®jsonãã¡ã¤ã«ã解æããªããã°ãããªãã¨ãï¼ããã¼ã«ã«ã§æµããã¹ã¯ãªãããå度ãããã¯ã·ã§ã³ç°å¢ã§æµãã®ã¯é¦¬é¹¿ãããã®ã§ããã¼ã«ã«ã®ãã¼ã¿ãã¼ã¹ããã³ããããã®ã使ãã®ãè³¢ãã®ã ã¨æãã ç°å¢ã¯æ¬¡ã®ãã®ãæ³å®ããã PostgreSQL Heroku PostgreSQLã§ã¯pg_dump dbname > dump.sqlãpsql dbname < dump.sqlãããªã³ãã³ãã使ããããHerokuã®ãããªç°å¢ã§ã¯ãããã®ã³ãã³ããç´æ¥å©ããªããã¨ãå¤
ä»»æã®ãã¼ã¿ãã¼ã¹ã«ActiveRecord ã§ã¢ã¯ã»ã¹ãããã ActiveRecordã§ä½ã§ãããã§ãã¤ã«ã¨æ¥½ã«ãªãæ°ãããã Rubyã§MySQLã«ã¢ã¯ã»ã¹ãã¦ãã¼ã¿èªã¿æ¸ãããã°ä¾¿å©ãã ã¤ã³ã¹ãã¼ã« gem install activerecord sudo aptitude install libmysql-ruby #mysql é¢é£ã®ããã±ã¼ã¸ãRubyã«å«ã¾ãã¦ããªãå ´å 使ãæ¹ require "rubygems" require "active_record"ç°¡åã«ãã¼ããããã¨ãã§ãã¾ãã ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã ActiveRecord::Base.establish_connection( :adapter=>"mysql", :host =>"localhost", :database =>"epgrec", :username=>"epgrec_user"
â»1/15 ActionMailerPreviewã«ã¤ãã¦è¿½è¨ Rails4.1ã®æ°æ©è½Action Mailer Previewsã¨ã¯ - rochefort's blog What's new in Rails 4.1 - Coherence Blog å ¬å¼blogã«æ²è¼ããã¦ãã®ã§è¦ã¦ã¿ã¾ãããçµæ§é¢ç½ãæ©è½ãæè¼ããã¦ããã§ãã ãèå³ã®ããæ¹ã¯æ¯éåæãã覧ãã ããã Overview Active Record Enums ARã§stausã¨ãä½ã¨ãåºåã¿ãããªã®ãattributeã¨ãã¦ç¨æããã¨ãã« enum使ãããã¨ããè¦æã¯ãããããã¨æãã¾ãã æè¿ã ã¨DBã«enumã®æ©è½ãå®è£ ããã¦ãããã¨ãããã¾ããã é常ã¢ããªã±ã¼ã·ã§ã³å´ã§å®è£ ããDBã¯æ°å¤ãæååããçªã£è¾¼ãã¨ãããããããã¾ãã ãããªå ´åRailså´ã¯ãHashã使ã£ãããåºå®å¤ï¼å¤§æåå®ç¾©ã®å¤æ°ï¼ã§å®
Ruby on Rails 4.1 Release Notes â Ruby on Rails Guides 2ç« ã¯ãæ©è½ç´¹ä»ã§ãã Rails 4.1 ã®æ°æ©è½ - rochefort's blog ã§æ¸ããã¨ãããç解ãæ·±ã¾ãã¾ããã 2 Major Features 2.1 Spring Application Preloader backgroundã§Railsãèµ·åãã¦ãããSpringã«ã¤ãã¦ã§ãã bin/railsã bin/rake ã¯èªåã§springãpreloadããããã«ãªãã¾ãã å©ç¨ä¾ï¼ bin/rake test:models bin/rails console $ bin/spring status Spring is running: 1182 spring server | my_app | started 29 mins ago 3656 sprin
åé ãåºå¸æ°ã¯ãã¯ãã¯ãããã®å°è±¡ã¨ãã¦ã¯ãã¬ã·ãã®ãµã¼ãã¹ãä¸çªå¼·ãã¨æãã¾ããããã以å¤ã®ãµã¼ãã¹ãæ°è¦äºæ¥ã«ãåãå ¥ãã¦ãã¾ããã¨ããä¸ã§ãcookpad.comã«é¢ãã話ããã¾ããã¨åãåºãã¦ã»ãã·ã§ã³ãå§ãã¾ããã ã¾ããRuby 2.0/Rails 3.2ã«ããç°å¢æ§æã説æããããã®ããªã¥ã¼ã ãæ£ç´çã£ã¦ããããããªãããªãæ°ãæéã§ããã ãå¢ãã¦ããã§ããâ¦â¦ãã®ãããç¬ãã¨ããã§ããï¼ãã¨ç¬ç¹ã®èªãå£ã§ã»ãã·ã§ã³ãé²ãã¦ããã¾ãã ãµã¼ãã¹ã®æé·ã¨å®å®æ§ã両ç«ããã3ãã¼ã å¶ ããããä¸å³ã®ãããªæé·ãã¼ã¹ã«ããããããããããã¤ã¯1æ¥10åãã¼ã¹ãç¶æãã¦ãããä¸ä½ã©ããã£ã¦ãããã»ã©ã®å®å®ãªãªã¼ã¹ãå®ç¾ãã¦ããã®ã§ããããï¼ åºå¸æ°ã¯ãã®ç¹ã«ã¤ãã¦ãã¨ã³ã¸ãã¢ã§æ§æããã¦ããããµã¼ãã¹éçºé¨ããã¤ã³ãã©é¨ããæè¡é¨ãã®åå¨ãæãã¾ããã ãµã¼ãã¹éçºé¨éããµã¼ãã¹éçº
Google+ãã¿ã³ ã¯ã¦ãªããã¯ãã¼ã¯ãã¿ã³ æ´æ°æ¥æ: 2014å¹´02æ26æ¥ï¼æ°´ï¼ ä½ææ¥æ: 2013å¹´09æ09æ¥ï¼æï¼ åã®è¨äº / 次ã®è¨äº ç®æ¬¡ ããããä½ãªã®ãï¼ ã©ããã£ã¦ä½¿ãã®ãï¼ åµã¾ããªãããã«ããï¼ã¨ã©ã¼ãraiseãããï¼ ä»®æ³å±æ§ã§ãå®ç¾©ãå¿ è¦ åè ããããä½ãªã®ãï¼ ä¾ãã°æ¬¡ã®ãããªã«ã©ã ãæã¤Articleãã¼ãã«ï¼è¨äºãã¼ãã«ï¼ããã£ã¦ã æ´æ°æã«ã¯ headline 㨠content ã ããæ´æ°ã㦠user_id ã¯å¤æ´ããããªãå ´åã ï¼user_id 㯠è¨äºã®ä½æè ãèå¥ããidã¨ãã¦ä½¿ããï¼ class CreateArticles < ActiveRecord::Migration def change create_table :articles do |t| t.integer :user_id t.string :headlin
def self.up add_column :posts, :rendering_mode, :string, :default => "plain" end def self.down remove_column :posts, :rendering_mode end ããã§ã¯ãæ°ãããã¼ã¿ã«ã¯ããã©ã«ãå¤ã¯ä¸ãããã¾ãããæ¢åã®ãã¼ã¿ã«å¯¾ãã¦ã¯ããã©ã«ãå¤ãä¸ãããã¨ã¯ã§ãã¾ããããã®å ´åãupdate_allãå©ç¨ãã¦ãä¸è¨ã®ããã«è¨è¿°ããã¨ãä»ã¾ã§ã®ãã¼ã¿ãæ´æ°ãã¦ããã©ã«ãå¤ãä¸ãããã¨ãã§ãã¾ãã def self.up add_column :posts, :rendering_mode, :string, :default => "plain" Post.update_all ["rendering_mode = ?","plain"] end def self.down
ï½¢Rubyãã¸ãã¹ã®æ¦ç¥ä¼è°çã¤ãã³ãããã¾ãï½£ããã声ã«ï½¤Rubyï¼Railsã®æè¡ã»äººæã»ãã¸ãã¹æ¦ç¥ã®è¦³ç¹ã§å¦ä½ã«æ¡å ããã¦ãããï¼ãã®ãã¦ãã¦ãå ±æããå ´ã¨ãã¦ï½¢Rubyï¼Rails BIZcon2013ï½£ã¯9æ6æ¥ï¼éï¼ï½¤ãã¸ãã¹OSSã³ã³ã½ã¼ã·ã¢ã ã»ã¸ã£ãã³ï¼ä»¥ä¸ï¼BOSS-CON JAPANï¼ä¸»å¬ã§éå¬ããã。 åºèª¿è¬æ¼ãä¸å¿ã«å½æ¥ã®æ¨¡æ§ãã¬ãã¼ãããã å®è¡å§å¡é·ãåããæ ªå¼ä¼ç¤¾ã³ã³ãã³ãã¯ã³åç· å½¹å·äºå¥å²æ°ã®ï½¢æ¬æ¥ã¯Rubyããã¸ãã¹ã§ãã£ã¨ä½¿ãããããªãã³ããçã§è¦ã¤ããããã°ï½£ã¨ã®éå¬ã¸ã®æãã®ããã£ãæ¨æ¶ããè¬æ¼ã®å¹ãä¸ãã£ã。 Rubyï¼Railsã®ææ°æè¡ååã¨ä»å¾ã®äºæ³ åºèª¿è¬æ¼ã§ã¯masudriveã®ãã³ãã«ãã¼ã ã§èåãªå¢äºéä¸éæ°ãç»å£ãã。 ã¾ãã¯Railsã®æ´å²ã«ã¤ãã¦ã®ãããããï½£ãèªãã、CoC、DRYçã ã®åºæ¬ã³ã³ã»ããã確ç«ããããã¼ã¸ã§ã³1
Rails4 社å åå¼·ä¼ã®çºè¡¨è³æã§ãã Blog: http://www.techscore.com/blog/2013/09/09/rails4-%E7%A4%BE%E5%86%85%E5%8B%89%E5%BC%B7%E4%BC%9A%E3%83%AC%E3%83%9D%E3%83%BC%E3%83%88/ (2013/10/03) TECHSCORE æ¬ä½ã« Rails4 ã®è¨äºãæ¸ãã¾ããï¼ã¹ã©ã¤ãã§ã¯æ¸ããããªãã£ã詳細ã«ã¤ãã¦ã解説ãã¦ãã¾ãã®ã§ããã¡ããã覧ãã ãããsee http://www.techscore.com/tech/Ruby/rails-4.0/Read less
railsã§è«çåé¤ãè¡ãã¨ãã«ä½¿ããã©ã°ã¤ã³ãacts_as_paranoidãã使ç¨ããã¨ã注æãããã¨ãããã¾ãã modelã«acts_as_paranoidãçµã¿è¾¼ã¿ãé常ã®æ¤ç´¢ãè¡ãã¨æ¬¡ã®ãããªSQLãçºè¡ããã¾ãã e = Employee.scoped SELECT "employees".* FROM "employees" WHERE (employees.deleted_at IS NULL) ããããåããacts_as_paranoidãçµã¿è¾¼ãã ã¢ãã«ãjoinãã¦ã¿ãã¨deleted_atãèæ ®ãããªãSQLãçºè¡ãããããã§ãã e = Employee.scoped.joins(:user) SELECT "employees".* FROM "employees" INNER JOIN "users" ON "employees"."id" = "use
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}