Problem with link tags

askegg <rails-mailing-list@...> writes:

Hu Ma wrote:
>
> So Rails is adding some numbers to the links. This breaks my javascripts
> and stylesheets. Can anyone help me?
>
> Thanks.
> Bye,
> Migrate

I believe rails does that to bypass any caching that can break scripts.

It should not break them though. Are you sure your scripts are in the
correct directory?

I'll second this. It shouldn't break your files at all.

The number is just a timestamp for the last file modification time. It's there
to ensure that any UA which is sloppy about caching will always get new versions
of the files when they're updated.

I think the problem is the / in front of your CSS names. This would be look for
the CSS files inside your /public directory, whereas they would normally be
stored in /public/stylesheets.

Using <% stylesheet_link_tag "form" %> will create a link to
/stylesheets/form.css which is probably what you're looking for.