Ruby on Rails Tuesday, February 28, 2012

I fixed the issue, it turns out that putting everything in a directory
inside Public was messing it up. Once I changed my references to
account for that, everything worked.

On Feb 28, 11:35 am, Andrew <abari...@gmail.com> wrote:
> I have a Cappuccino app that I am integrating with a Rails backend. A
> key feature of the app is authentication which is managed entirely by
> rails. The way I set it up is that the cappuccino js conditionally
> executes if the user is logged in, like this:
>
> <% if signed_in? %>
>
> <div id="cappuccino-body">
> <script type="text/javascript">
> document.write("Hello World")
> </script>
> </div>
>
>  <% end %>
>
> Where signed_in? is a rails method that returns a boolean value
> reflecting whether the user is authenticated.
>
> The issue I am having is when I embed the scripts to launch Cappuccino
> into an erb page, I get 404 errors because Rails cannot find the
> associated files. I tried putting them into /vendor/assets and /public
> with no luck in either case. Does anyone know the right location for
> these files? Or is this a routing issue and I need to update my routes
> file?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment