2015-01-01から1年間の記事一覧
こちらの続きです。 Crafting Rails 4 Applications - capter 1-2 - Writing the Renderer - Satomi's Daily Notestsumekoara.hateblo.jp 1-3. Rails Rendering Stackを理解する Action MailerとAction Controller はいくつかの共通機能を持っています。例え…
こちらの記事の続きです。 Crafting Rails 4 Applications - capter 1-3 - Understanding the Rails Rendering Stack - Satomi's Daily Notestsumekoara.hateblo.jp 1.4 次のレベルへ rendererの実装に話を戻します。以下の様なcontrollerでないが起きるか勉…
こちらの記事の続きです。 Crafting Rails 4 Applications - capter 1-4 - Talking It to the Next Level - Satomi's Daily Notestsumekoara.hateblo.jp 1.5 まとめ この章ではPDFフォーマット用のrendererを作りました。このアイデアを使えば、csvやatomと…
Introduction: PART 1: Generate Project using template. Watch app at localhost, iOS simulator, heroku
Condition Yosemite Install read: http://ionicframework.com/getting-started/ $ npm install -g cordova ionic Select Project Template read: http://ionicframework.com/getting-started/ $ ionic start myApp sidemenu run ionic command localhost $ …
↓のつづきです。 Crafting Rails 4 Applications - capter 1-1 - Satomi's Daily Notestsumekoara.hateblo.jp 1.2 Rendererを書く まずはじめに、render()メソッドと許容されるいくつかのオプションについて話をしましょう。rendererとは何かということを正…
↓のつづきです。 Crafting Rails 4 Applications - capter 1-1 - Satomi's Daily Notestsumekoara.hateblo.jp 1.2 Rendererを書く まずはじめに、render()メソッドと許容されるいくつかのオプションについて話をしましょう。rendererとは何かということを正…
随時追記していきますー 単数形だとか複数形だとかこだわらず、よく見る形のままリストしています。 Word / Idiom 英語 日本語 使い方など sanity 整合性のある、正当な assert 断言する dependencies 依存関係 gemとかに使う configure 構成する、設定する…
随時追記していきますー 単数形だとか複数形だとかこだわらず、よく見る形のままリストしています。 Word / Idiom 英語 日本語 使い方など sanity 整合性のある、正当な assert 断言する dependencies 依存関係 gemとかに使う configure 構成する、設定する…
p1 第一章 Rendererを自作する 多くのWebフレームワークと同様に、RailsもMVC(model-view-controller)アーキテクチャをコードの組織化に用いています。Controllerはモデルから情報を収集し、レンダリングの為にViewにそのデータを渡すことを担当します。対し…
p1 第一章 Rendererを自作する 多くのWebフレームワークと同様に、RailsもMVC(model-view-controller)アーキテクチャをコードの組織化に用いています。Controllerはモデルから情報を収集し、レンダリングの為にViewにそのデータを渡すことを担当します。対し…
Generating Rails project, and come to phase to commit it. The file size is even more than my expectation. $ git push origin master Counting objects: 26593, done. Delta compression using up to 4 threads. Compressing objects: 100% (24906/249…
Generating Rails project, and come to phase to commit it. The file size is even more than my expectation. $ git push origin master Counting objects: 26593, done. Delta compression using up to 4 threads. Compressing objects: 100% (24906/249…
(source: http://whyzat.com/wp-content/uploads/2014/04/Useful-Dog.jpg) Version Ruby # 2.2.1 Rails # 4.2.0 Install $ vi Gemfile -------- # add gem 'annotate' -------- $ bundle install Make Config File(Task File) $ bundle exec rails g annotat…
(source: http://whyzat.com/wp-content/uploads/2014/04/Useful-Dog.jpg) Version Ruby # 2.2.1 Rails # 4.2.0 Install $ vi Gemfile -------- # add gem 'annotate' -------- $ bundle install Make Config File(Task File) $ bundle exec rails g annotat…
def check true if hoge.present? && fuga.present? end ↑this above can be improved. def check hoge.present? && fuga.present? end Review AND, OR, XOR def hoge # AND false && false #=> false false && true #=> false true && false #=> false true…
In many cases, phantom.js is used to get screen capture. But wkhtmltoimage can be alternative. Install http://wkhtmltopdf.org/downloads.html $ sudo yum install -y openssl libX11 libXext libXext.so.6 $ cd /usr/local/src $ wget http://downlo…
to use bulk insert on Rails, add gem below. gem 'activerecord-import' In MySQL, bulk update can be used by this gem, but postgres..... sqlite..... update_all solution! # make all records with open: false to open: true Shop.where(open: fals…
to use bulk insert on Rails, add gem below. gem 'activerecord-import' In MySQL, bulk update can be used by this gem, but postgres..... sqlite..... update_all solution! # make all records with open: false to open: true Shop.where(open: fals…
In many cases, phantom.js is used to get screen capture. But wkhtmltoimage can be alternative. Install http://wkhtmltopdf.org/downloads.html $ sudo yum install -y openssl libX11 libXext libXext.so.6 $ cd /usr/local/src $ wget http://downlo…
def check true if hoge.present? && fuga.present? end ↑this above can be improved. def check hoge.present? && fuga.present? end Review AND, OR, XOR def hoge # AND false && false #=> false false && true #=> false true && false #=> false true…
NeoBundle is ... read this. Install $ mkdir -p ~/.vim/bundle $ git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim Setup write configuration at ~/.vimrc for NeoBundle "--------------------------- " Neobundle Setti…
NeoBundle is ... read this. Install $ mkdir -p ~/.vim/bundle $ git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim Setup write configuration at ~/.vimrc for NeoBundle "--------------------------- " Neobundle Setti…
Deviseを使ってユーザー登録を使用としたら、Devise::RegistrationsControllerの方のrespond_withのあたりでActionController::UnknownFormatエラーが吐かれました。 ルーティングはこんな感じ devise_for :users, :controllers => { :sessions => "users/se…
Deviseを使ってユーザー登録を使用としたら、Devise::RegistrationsControllerの方のrespond_withのあたりでActionController::UnknownFormatエラーが吐かれました。 ルーティングはこんな感じ devise_for :users, :controllers => { :sessions => "users/se…
simple_formを使っています。 同じformを使ってcreateとupdateをすることが多いと思います。 症状 updateを叩いたつもりが、こんなエラーに出くわしました。 Routing Error No route matches [PATCH] “/hoge" ちなみにroutingは POST /hoge(.:format) hoge#c…
Install elasticsearch to Yosemite! Yosemite $ brew install elasticsearch # Elasticsearch Client gem 'elasticsearch-model' gem 'elasticsearch-rails' gem 'bonsai-elasticsearch-rails' $ bundle install Plugin Japanese Character Adaptor The Jap…
Rails4で作っているプロジェクトで、Carrierwaveを使おうとすると、RMagickも一緒に使うことが多いかと思います。 それらのセットアップ時のトラブルです。 エラーたち bundle installが落ちる $ bundle install --path vendor/bundle ---- An error occurre…
Rails4で作っているプロジェクトで、Carrierwaveを使おうとすると、RMagickも一緒に使うことが多いかと思います。 それらのセットアップ時のトラブルです。 エラーたち bundle installが落ちる $ bundle install --path vendor/bundle ---- An error occurre…
Install elasticsearch to Yosemite! Yosemite $ brew install elasticsearch # Elasticsearch Client gem 'elasticsearch-model' gem 'elasticsearch-rails' gem 'bonsai-elasticsearch-rails' $ bundle install Plugin Japanese Character Adaptor The Jap…
simple_formを使っています。 同じformを使ってcreateとupdateをすることが多いと思います。 症状 updateを叩いたつもりが、こんなエラーに出くわしました。 Routing Error No route matches [PATCH] “/hoge" ちなみにroutingは POST /hoge(.:format) hoge#c…