On Dec 15, 7:18 am, Angappan Ayyavoo <rails-mailing-l...@andreas-
s.net> wrote:
> Hai
>
> Iam newbie.
>
> Iam using ruby on rails, I have some doubts in it.
>
> The steps i followed is
> Using ruby 1.8.6
> rails 2.2.2
>
> http://www.ibm.com/developerworks/linux/library/l-rubyrails/
>
Your tutorial is 3 and a half years old. Rails has changed
tremendously since then. A lot of that information in that tutorial
doesn't cover how newer versions of rails do it or just won't work
anymore.


>  7) altered in
>
> class ContactController < ApplicationController
>   model :contact
>   scaffold :contact
> end
>
> Errors:
>
>  model is unknown.
Both the model and scaffold methods were removed

>
> 8)
> class ContactsController < ApplicationController
>   def list
>     @contacts = Contact.find_all
>   end
>   def show
>     @contact = Contact.find(@params['id'])
>   end
>   def create
>     @contact = Contact.new(@params['contact'])
>     if @contact.save
>       flash['notice'] = 'Contact was successfully created.'
>       redirect_to :action => 'list'
>     else
>       render_action 'new'
>     end
>   end
>
> Error: end
>
> C:/Ruby/AddressBook/app/controllers/contacts_controller.rb:16: syntax
> error, unexpected $end, expecting kEND

If you indent that file properly it should be clear that you are
indeed missing an 'end'

Fred
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to