Wednesday, August 29, 2012

[Rails] custom js in rails project

Hello, I have a rails project with one controller and one action, as
simple as posible. And I'm trying to put some custom css and js to my
own index.html.erb (not public/index.html.erb), I inluded this on the
layout file:

layout file:

<!DOCTYPE html>
<html>
<head>
<title>Volei</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag 'foundation.min.js' %>
<%= javascript_include_tag 'app.js' %>
<%= javascript_include_tag 'jquery.foundation.navigation.js' %>
<%= javascript_include_tag 'modernizr.foundation.js' %>
<%= javascript_include_tag 'mijs.js' %>
<%= csrf_meta_tags %>

</head>
<body>

<%= yield %>

</body>
</html>



My scripts are in assets/javascripts. And the css works fine, but the js
not.

I google how to add js and css in rails, and I think I am doing it
right.. any advice please??

thanks in advance!

--
Posted via http://www.ruby-forum.com/.

--
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 https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate