03 Sep '12, 6am

Ruby on Rails 3 の Ajax いろいろ - @yuumi3のお仕事日記

Ruby on Rails 3 の Ajax いろいろ - @yuumi3のお仕事日記

<[Ruby] 最近作った Jekyll (Liqu... 2012-09-03 ■ [Ruby ] Ruby on Rails 3 の Ajax いろいろ 15:32 今さら感はありますが、Rails3 の Ajax 実装の方法を紹介します。 Rails3.1 から jQuery がデフォルト になり、Ajax もRails2の頃とは違うスタイルなりました。また、幾つかのパターンが選べるようになりました。 ここでは上の画像のように、 rails g scaffold todo due:date task:string で作ったアプリ のshow がindex画面に表示される簡単な Ajax アプリ で説明します。 1. Rails2 に近いやり方 Rails2 では、view にjavascript を書かずに ajax アプリ を書けるようになっていましたが、それに近い方法は、 index.html .erb の showへのリンクに :remote => true を指定し、Ajax 用の表示エリア div.show_area を置きます。 <% @todos.each do |todo| %> .... < td ><%= link_to 'Show' , todo, :remote => true %> </ td > ... <% end %> ... < div id = "show_area" ></ div > todos_controller.rb の show メソッド の表示に javascript リクエストに対応する format.js を追加 def show @todo = Todo .find(params[:id ]) respond_to do |format | format.html # show.html.erb format.js # show.js.erb format.json { render json: @todo } end end show.js .erb テンプレート を追加し、ブ...

Full article: http://d.hatena.ne.jp/yuum3/20120903/1346653974

Tweets

Learn Ruby on Rails w/ a friend @GA_London this...

generalassemb.ly 03 Sep '12, 2pm

Want to be able to take your ideas and visions and translate them into real working applications? Interested in increasing...

From CodeIgniter to Ruby on Rails: A Conversion - Nettuts+

From CodeIgniter to Ruby on Rails: A Conversion...

net.tutsplus.com 03 Sep '12, 8am

* { margin: 0; padding: 0; } body { background: #323f66 top center url("../images/back.png") no-repeat; color: #ffffff; fo...

Reminder: We're throwing our first Ruby / Rails...

columbusrb.com 04 Sep '12, 1pm

Join us as we explore the Ruby and Rails ecosystems. All levels of experience are welcome and encouraged to join!

FeedBurn Offres> développeur ruby on rails pass...

maroc.offres-emploi.ma 04 Sep '12, 3pm

Cyclones Impact (société Française basée à Paris) souhaite implanter son agence dédiée Ruby On Rails(RoR) avec son univers...

Ruby coder Pro needed. by bradleysnider: Need h...

freelancer.com 11 Sep '12, 6am

Freelancer.com (formerly GetAFreelancer) is the world's largest outsourcing and crowdsourcing marketplace for small busine...

senior Ruby on Rails Developer by sanacruize: W...

freelancer.com 07 Sep '12, 7am

Project ID: 2466964 Project Type: Hourly Hours of work: Unspecified Project Duration: Ongoing Project Description: We are ...

@Denial0fService @dyfustic

whois.domaintools.com 02 Sep '12, 8pm

You've got your own way of working Now you can configure DomainTools Whois results to show you only the data you want to s...

Senior Ruby on Rails Developer at reqorder solu...

careers.joelonsoftware.com 03 Sep '12, 4pm

Senior Ruby on Rails Developer reqorder solutions GmbH Berlin, Germany; Cologne, Germany ruby-on-rails infrastructure redi...

Setup Ruby on Rails on OSX

reddit.com 09 Sep '12, 7pm

First things first, you need a C compiler such as GCC or clang/LLVM. The easiest way to do this is to download XCode from ...

Web Application Development | AJAX | jQuery / P...

freelancer.com 07 Sep '12, 8am

Project ID: 2467124 Project Type: Fixed Project Description: Hello , Here are is few things you should know before reading...

Instalar Ubuntu 12.04 com Ruby 1.9.3, Rails, Ng...

kneipp.github.com 02 Sep '12, 1pm

Atualizar o sistema e instalando ferramentas sudo apt-get -y update sudo apt-get -y install build-essential zlib1g-dev lib...

Shop our new arrivals EZ114 today

eatingzombie.com 16 Sep '12, 4am

Click here to view the directions to our Office/Studio for self-collection!