geermc4
geermc4

Reputation: 568

can I change the format of render partial in a way which changes the format of the partial it loads?

I'm trying to simplify a view from spree for a tablet, using mobile-fu, I copied the view I want to simplify and named it .tablet.erb and i also had to copy the admin layout and rename it to .tabler.erb, the problem is that the layout uses more partials, and those partials use some more, i'm trying to avoid having to copy all the files just to give them a different name or just plain change the render to tell it to use the html one.

Is there a way to tell it to use html format from that point on? like setting the format recursively?

Upvotes: 2

Views: 214

Answers (1)

geermc4
geermc4

Reputation: 568

<% self.formats = [:mobile, :html] %> on each view solved it

Got it from here

Upvotes: 2

Related Questions