config/routes.rb
map.connect 'greeting', :controller => 'greeting', :action => 'index'

?

On Mon, Jul 5, 2010 at 11:51 PM, Karen Kalashyan <kareni...@gmail.com>wrote:

> 2010/7/6 Colin Law <clan...@googlemail.com>
>
>> On 5 July 2010 09:42, Karen Kalashyan <kareni...@gmail.com> wrote:
>> > app/
>> >
>> > controllers/
>> >
>> > application_controller.rb
>> >
>> > greetings_controller.rb
>> >
>> > helpers/
>> >
>> > application_helper.rb
>> > greetings_helper.rb
>> >
>> > models/
>> >
>> > photo.rb
>> >
>> > views/
>> >
>> > greetings/
>> >
>> > index.html.erb
>> >
>> > layouts/
>> >
>> >
>> > greetings_controller.rb:
>> > class GreetingsController < ApplicationController
>> > def index
>> > @mes = 'test'
>> > end
>> > end
>> > index.html.erb
>> > <p><%= @mes %></p>
>> > html ouput (http://localhost:3000/greetings/
>> > or http://localhost:3000/greetings/index/):
>> > <p><%= @mes %></p>
>> >
>> > Why it's so hard?! :)
>> > No bug report.. Nothing..
>>
>> Could you avoid top posting please, it makes it more difficult to
>> follow the thread.
>>
>> What do you see in development.log?
>>
>> Which version of rails are you using?  You said 2.x but that covers a
>> lot of versions.
>>
>> Colin
>>
>> >
>> > 2010/7/5 Colin Law <clan...@googlemail.com>
>> >>
>> >> On 4 July 2010 21:40, Karen Kalashyan <kareni...@gmail.com> wrote:
>> >> >> I don't understand the last bit of the sentence above.  Please
>> expand
>> >> >> what
>> >> >> you
>> >> >> mean by "/.erb/.html.erb - doesn't match".  Do you mean that
>> >> >> /app/view/greeting/index.erb and /app/view/greeting/index.html.erb
>> are
>> >> >> ignored
>> >> >> by the template engine?
>> >> >
>> >> > Yes!
>> >> > It doesn't make sense.
>> >> > I'm using 2.x version.
>> >> > Now controller name is Greetings, and view file name is
>> index.html.erb
>> >> > But the problem hasn't been solved :(
>> >>
>> >> Please tell us the current filenames and contents again to make sure
>> >> of what you have done.  Have you removed all the old files?  Rails has
>> >> a habit of loading files that you have left lying around by accident.
>> >> What exactly is the symptom now seen?
>> >>
>> >> Colin
>>
>
>
> i'm using last version from rubyonrails.org
>
> log:
>    [4;35;1mSQL (0.2ms) [0m   [0mSET SQL_AUTO_IS_NULL=0 [0m
>
>
> Processing GreetingsController#index (for 127.0.0.1 at 2010-07-05 12:41:42)
> [GET]
> Rendering greetings/index
> Completed in 2ms (View: 1, DB: 0) | 200 OK [
> http://localhost/greetings/index/]
>
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://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-t...@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