How to access session, cookies, params, request in Model !! Published almost 4 years ago For fuck’s sake, STOP asking this question in IRC You’re completely/totally/fucking wrong if you want to access sessions, params, cookies, etc. in your Models. You can’t get more wrong than this in rails world probably. But some people just don’t get it. So if you must, this is how you can do it ( I’d suggest
Pryという新しいREPLツールがとっても便利だ。 詳しい使い方は、Wikiを読めばだいたいわかる。 Railsコンソールでもこの便利なPryを使うには、Using Pry instead of IRB for Rails' consoleで紹介されているように、config/initializers/pry.rbに次のよう に記述してIRBを呼び出す替わりににPryを起動するように上書きする。 begin require 'pry' module Rails class Console class IRB def self.start Pry.start end end end end rescue LoadError => e puts e end これでRails consoleがPryで起動するようになる。 $ rails console Loading development e
As I promised at RailsConf, we’re finally good to go on the Rails 3.1: Release Candidate. This is a fantastically exciting release. We have three new star features and an even greater number of just awesome improvements. First the stars: The Asset Pipeline The star feature of 3.1 is the asset pipeline powered by Sprockets 2.0. It makes CSS and JavaScript first-class code citizens and enables prope
コンテンツへスキップ 無料で使える!HubSpotの顧客リストの活用法 無料のアンケート作成ツール 比較/まとめ 無料「Excel」 テンプレート 比較/まとめ 無料で使えるノートアプリ比較 (Evernote / OneNote / Google Keep) おすすめの無料Web会議システム5選 WebP Converter 徹底解説!初心者でも直ぐに使える HubSpot は、マーケティング、セールス、サービスのためのCRM(Continue reading 多くの人の声を聞くことで改善できることも多い 企業や団体など運営していContinue reading 就職・転職には必須となる履歴書・職務経歴書 これから就職活動をスタートContinue reading 便利なノートアプリで効率的な仕事をしよう いつの時代も仕事をしていてメContinue reading 近年、リモートワーク
JavaScriptへコンパイルして実行することを前提としたスクリプト言語「CoffeeScript」がちょっとした注目を集めています。CoffeeScript自体は2009年末に登場し、その1年後の2010年12月にバージョン1.0がリリースされていますが、注目を集めたのは、数日前(2011年4月13日)にRuby on Railsの生みの親であるDHHが、次期バージョンのRails3.1でjQueryやSCSSと合わせて、CoffeeScriptをデフォルトとして採用するとTwitter上で発言して議論が巻き起こったからです。 Yes, it's true, Rails 3.1 is going to ship with CoffeeScript and SCSS in the box for use with the new asset pipeline. It's bad ass.
Life as a “Rails Developer” is a pretty smooth sailing and Bundler just makes it ever better. Rails 2.3.8 is the newest version from the Rails team. Don’t get me wrong, I love to hack my way through Rails3 but time is a big constraint for the project I am working on at the moment. With Rails3, I am bound to hit some road blocks but this is just a quick project I would like to get done and over wit
generates an application with jQuery. The -j option of the generator lets you choose Prototype and Scriptaculous instead: Such an application does not have RJS yet available though. From now on prototype-rails is needed for RJS, see below. Upgrading Applications Using No RJS Existing applications using no RJS should remove any references to ActionView::Base.debug_rjs in the project. Typically that
Hello everyone! I’ve released Rails version 3.0.7! I want to say thanks to Santiago for handling the release candidate gems. He’s on vacation, so I get to do the real thing. The main change in this release is to fix a performance regression in ActiveRecord that was introduced in version 3.0.6. Changes For a web friendly view, check out the compare view on github. For those that want the TL;DR of t
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く