Blog: http://sixrevisions.com/web-development/how-to-create-a-blog-from-scratch-using-ruby-on-rails/ I will pay for someone to solve this problem for me! post ur email or msn or yim! Basically, what i got at the moment that works is the reading, ADD and EDIT and delete posts that people have made, i have also added a friendship so only friends of that person can view the post. What i want to achieve now is that users can comment on that post! This is the hard thing and i dont understand how i can combine the commenting system with my own reading system. Also, i have done some tests but i really need some help! in my view/ reading i only have the add.rhtml and edit.rhtml. In the userhub page, i have the current code: ###################################### app/view/user/index.rhtml ###################################### <% @user.reading.each do |reading| %> <div id="hubtwo"><u>Book:</u> <%= reading.name %><br /> <u>Description:</u> <%= reading.description %></div> <%= link_to "Edit", :controller => :reading, :action => :edit, :id => reading.id %> | <%= link_to "Delete", :controller => :reading, :action => :delete, :id => reading.id %> <% end %> ###################################### Reading File?: Controller is called "reading" Made this myself: ###################################### reading_controller.rb ###################################### class ReadingController < ApplicationController before_filter :protect def add @title = "Add a New Reading Material" if request.post? @reading = Reading.new(params[:reading]) @reading.user_id = User.logged_in(session).id if @reading.save flash[:notice] = "Reading #{@reading.name} added!" redirect_to :controller => :user, :action => :index end end end def edit @title = "Edit a Reading material" @reading = Reading.find(params[:id]) if request.post? if @reading.update_attributes(params[:reading]) flash[:notice] = "Reading #{@reading.name} updated!" redirect_to :controller => :user, :action => :index end end end def delete @reading = Reading.find(params[:id]) flash[:notice] = "Reading #{@reading.name} deleted!" @reading.destroy redirect_to :controller => :user, :action => :index end private # Protect a page against not logged users def protect unless User.logged_in?(session) flash[:notice] = "Please login first" redirect_to :controller => :user, :action => :login return false end end end ###################################### -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Anyone? Please help! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 April 2010 21:50, Guru_101011 <jagmitg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Anyone? Please help!You may have to wait more than a couple of hours for a reply. What you must remember is that at any particular moment one third of the world is asleep, another third is working. 99% of the rest have never heard of Ruby on Rails, and 99% of those that have are not monitoring this list. It seems that just leaves you and me at the moment, and I am retired and not interested in paid work. Sorry Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 April 2010 22:05, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 18 April 2010 21:50, Guru_101011 <jagmitg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> Anyone? Please help! > > You may have to wait more than a couple of hours for a reply. What > you must remember is that at any particular moment one third of the > world is asleep, another third is working. 99% of the rest have never > heard of Ruby on Rails, and 99% of those that have are not monitoring > this list. It seems that just leaves you and me at the moment, and I > am retired and not interested in paid work.Actually my maths is way off, that would still leave about a quarter of a million people monitoring the list at the moment, I wonder why no-one else replied. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 April 2010 22:14, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Actually my maths is way off, that would still leave about a quarter > of a million people monitoring the list at the moment, I wonder why > no-one else replied.LOL! You have too much free time! :-) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The "15 minute blog" screencast will show you how to set up a basic blog: http://media.rubyonrails.org/video/rails_blog_2.mov If your goal is to learn Ruby on Rails, then paying somebody to write the code for you isn''t going to be a very effecitve way to learn. On Apr 18, 11:21 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 18 April 2010 22:14, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > Actually my maths is way off, that would still leave about a quarter > > of a million people monitoring the list at the moment, I wonder why > > no-one else replied. > > LOL! You have too much free time! :-) > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.