On Fri, Jul 23, 2010 at 5:22 PM, Jan Kadera <[email protected]> wrote:
> Well, after a while trying I found a way to do it right. The first time, I
> created just controller
>
> and it didn't work (that's the point where you were suggesting routing)
>
> but the only thing I needed was to destroy all the work done and use the
> command
> script/generate controller home action1 action2...
>
> and voi'la myIP:3000/home works now :)
because the routes.rb file has been updated, which you could have
easily done manually :-)
> BUT! What I'm trying to figure out now is addressing inside of the app. I'm
> trying to set up a background for the page but the relative path starting
> from the route of the app doesn't work and unfortunately the absolute path
> doesn't work either.
> So where is the root of the relative path?
Static resources are typically served from /public/* so e.g. an image in
{RAILS_ROOT}/public/images/foo.png would be accessed by the URL
http://hostname:port/images/foo.png
HTH,
--
Hassan Schroeder ------------------------ [email protected]
twitter: @hassan
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.