lucasefe / themes_for_rails

Theme Support for Rails 3
This very same page :)
MIT License
308 stars 102 forks source link

Theme with method #4

Closed matheusca closed 14 years ago

matheusca commented 14 years ago

I try this: theme :select_theme and bellow

protected

def select_theme 'default' end

But doesn't work.

Anyone had same problem?

lucasefe commented 14 years ago

Can you be more specific? Are you using the latest version? Do you have any custom configuration?

Thanks

lucasefe commented 14 years ago

I am using it like this, invoking it as a class method.

class MyController < ApplicationController theme :current_theme def current_theme "default" end end

Can you provide a Gist, please?

matheusca commented 14 years ago

Yes, I am using the latest version. I try use custom configuration like README just for test. I had no errors, but simply doesn't work.

lucasefe commented 14 years ago

Are you calling the theme method at class level of instance level? If you put something invalid (like an invalid statement) does it fail? Does it throws an exception?

I need more context to try to help you, matheusca.

matheusca commented 14 years ago

http://gist.github.com/658249

I try this.

lucasefe commented 14 years ago

can you please replace the content of the method define_theme with this:

raise "I am being called"

and tell me what's happening?

Thanks

matheusca commented 14 years ago

Nothing happening. Don't call the method.

lucasefe commented 14 years ago

it's weird. I am using it perfectly, exactly the same you are.

Do you have the application in a public repository? Or maybe you can send it to me so I can try to see what's going on?

lucasefe @ gmail

matheusca commented 14 years ago

lucas the app its private. I try fix, if i don't get i send for you, else I write here what is the problem and solution.

Thanks for help me.

lucasefe commented 14 years ago

Ok, no problem. Looks weird... that's like the basic functionality... It should work.

let me know