Search the assets path for the assets file.  Asset files must be have un...

...ique names and paths.

Also looks for files relative to the current asset that is being processed.
For Example href="../my-other-component/other-component.html" will still be included.
In addition as long as the root extension is correct it will work as well
(index_action.html.erb) will still be included even if you use href="other-component.html"
I have updated the components_path function.

I thought that throwing an un caught exception would not be good, and here
is my reason.  Lets say that you are referencing a file on the web for
whatever reason, the node should just not be replaced.

For example checkout the font-roboto template:

<!--

Copyright (c) 2014 The Polymer Project Authors. All rights reserved.

This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt

The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt

The complete set of contributors may be found at
http://polymer.github.io/CONTRIBUTORS.txt

Code distributed by Google as part of the polymer project is also

subject to an additional IP rights grant found at
http://polymer.github.io/PATENTS.txt

-->

<link href='//
fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en'
rel='stylesheet' type='text/css'>


This is still valid, and it should leave the link tag unaltered, in my
opinion.

On Mon, Sep 22, 2014 at 11:58 AM, Alex Chaplinsky <notifications@github.com>
wrote:

> In lib/polymer-rails/processors/components_processor.rb:
>
> >          end
> >        end
> >
> >        def asset_content(file)
> >          dir  = File.dirname(@context.pathname)
> >          path = File.absolute_path(file, dir)
> > -        @context.evaluate path
> > +        if File.exists? path
>
> I don't think that we should let it silently fail to load asset. Would
> suggest to leave it rising Sprockets::FileNotFound exception
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/alchapone/polymer-rails/pull/12/files#r17865689>.
>