开发者

I have the CSS & JS, how do I convert that to erb for my Rails app?

So I have the foundation of my Rails app, then I went ahead and did the JS and CSS.

How do I then take the CSS and JS that I have, and apply it to the app in a 'Rails Way'. i.e. a dynamic way that works nicel开发者_JAVA技巧y.

Can you give me some tutorials/articles/resources that I can read up to guide me, please?

I have tried the Rails guides, but I find them a bit lacking.

Any other good suggestions or tips that might help get me on the right track?

Thanks.


The dynamic behavior in any web application can be expressed by using server side code, and/or client side code. In the client side there is a combination of techniques called AJAX that help to create a fluent interaction with the user.

You can learn a lot of Rails watching screencasts. You can have a look at Railscasts or PeepCode which are plenty of good tutorials.


Well, I don't know exactly what you're looking for, but one thing I'd start with is using HAML instead of ERB.

HAML is about as "railsy" as you can get for writing views. It saves tons of typing, and is simply beautiful to look at. Check it out :)


Are you talking about the javascript_include_tag and stylesheet_tag?

http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-javascript_include_tag

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜