所以我创建一个简单的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
谢谢您的时间!
听起来不错!会试试看,谢谢! –