Hi,
I tried to make a simple test with facebox_render and rails 3.
Here are my steps:
1.) Installed Jquery 1.4.2 (Jrails)
2.) Installed the plugin rails plugin install git://github.com/ihower/facebox_render.git
3.) and added the following lines:
in my application.html.erb
<head>
<title><%= yield(:title) || "Untitled" %></title>
<%= stylesheet_link_tag "reset", "application", "facebox" %>
<%= javascript_include_tag :defaults, "facebox" %>
<%= csrf_meta_tag %>
<%= yield(:head) %>
</head>
and in my application_controller
class ApplicationController < ActionController::Base
include FaceboxRender
end
When I tried to load something in the facebox, I have only the loader, nothing appears...
for example, in my home/index.html.erb
<%= facebox_link_to "test", :url => "/images/rails.png" %>
I would be pleased to know where I am wrong, In the doc:
* facebox_link_to helper, it’s will launch loading facebox first, send ajax request second)
* link_to :remote => true, form_for :remote => true …etc Ajax helper (for Rails 3)
So I think I'm stuck to send ajax request..
After looking the following post: How to make facebox popup remain open and the content inside the facebox changes after the submit it seems that I have the same problem: I can see "Ajax is not defined" in yhe firebug console
My js files is however correctly loaded: (as the source code shows)
<link href="/stylesheets/reset.css" media="screen" rel="stylesheet" type="text/css">
<link href="/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css">
<link href="/stylesheets/facebox.css" media="screen" rel="stylesheet" type="text/css">
<script src="/javascripts/jquery.min.js" type="text/javascript"></script>
<script src="/javascripts/rails.js" type="text/javascript"></script>
<script src="/javascripts/facebox.js" type="text/javascript"></script>
<script src="/javascripts/application.js" type="text/javascript"></script>
Thanks for any help!