所以我創建一個簡單的RoR應用程序與evernote的外觀和感覺。RoR創建一個動態的「evernote」 - 頁
notebook.rb
class Notebook < ActiveRecord::Base
belongs_to :user
has_many :notes
end
note.rb
class Note < ActiveRecord::Base
belongs_to :user
belongs_to :notebook
end
和我去前進,創造了一個靜態的控制器索引視圖,這將是我在那裏顯示儀表板
static_controller.rb
class StaticController < ApplicationController
def index
if user_signed_in?
@user = current_User
@notebooks = @user.notebooks
@notes = @user.notes
end
end
end
我該如何顯示筆記本的列表?每當用戶點擊一個特定的筆記本,該筆記本的筆記顯示在第二列...
我正在考慮爲此創建iframe,但它會更好,如果這些都是divs,我們可以使用jquery動態更新它們......但我仍然沒有想出如何去做。
對不起,聽起來很新奇。
這裏是什麼,我基本上要快照完成
http://i.stack.imgur.com/8gs0l.png
謝謝您的時間!
聽起來不錯!會試試看,謝謝! –