ruby - How to convert html pages into erb in Rails? -


i have been given task convert static html pages erb pages, used in rails project. since pages belong same project, having common "application.html.erb" file. html pages have different class names <body> tag. , since have common "application.html.erb" file. how convert such html pages different names <body> tag , .erb files?

i instance variable, expected set in controller.

<body class="<%= @body_class %>"> 

you can set on per-controller or per-action basis. if there "formula" decide is, based on controller , action, via single before_filter defined in applicationcontroller.


Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -