jmcgrath@whoi.edu
2006-Apr-24 00:05 UTC
[Rails] Just a couple questions on how I should go about
> I need a simple blog with categories and comments and an archive. I want a > nice posting system, but don''t want it in HTML. Is there something I can add > or make, kind of like BBCODE?http://whytheluckystiff.net/ruby/redcloth/ http://wiki.rubyonrails.org/rails/pages/RedCloth> I pretty much know what else I have to do, but there is one more thing. A > client section. I want clients to be able to login and view things I''ve > submitted and be able to comment back. A rudimentery forum. If there were a > http://clients.whatever.com/zigzag I''d want to be able to say only THIS user > and THAT user can look at /zigzag and comment/add things. Any idea how I > should go about it?there''s a brazillion solutions, but a good place to start might be the login engine: http://www.rails-engines.org/login_engine then in your controller code you can auth against the logged-in user: if session[:user].id == some_object.owner_id # do stuff end best, john ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Thanks a lot for those tips. Redcloth seems great. And that idea for checking the session is great. I still need to get into the programming mindset, I didn''t get too far with PHP. On 4/23/06, jmcgrath@whoi.edu <jmcgrath@whoi.edu> wrote:> > > I need a simple blog with categories and comments and an archive. I want > a > > nice posting system, but don''t want it in HTML. Is there something I can > add > > or make, kind of like BBCODE? > > http://whytheluckystiff.net/ruby/redcloth/ > http://wiki.rubyonrails.org/rails/pages/RedCloth > > > I pretty much know what else I have to do, but there is one more thing. > A > > client section. I want clients to be able to login and view things I''ve > > submitted and be able to comment back. A rudimentery forum. If there > were a > > http://clients.whatever.com/zigzag I''d want to be able to say only THIS > user > > and THAT user can look at /zigzag and comment/add things. Any idea how I > > should go about it? > > there''s a brazillion solutions, but a good place to start might be the > login > engine: > > http://www.rails-engines.org/login_engine > > then in your controller code you can auth against the logged-in user: > > if session[:user].id == some_object.owner_id > # do stuff > end > > best, > john > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060424/97b232a1/attachment-0001.html