search for: find_them

Displaying 1 result from an estimated 1 matches for "find_them".

Did you mean: find_theme
2007 Mar 01
0
association extensions - has_one
...hing like... if(User.current.admin?) Theme.find(:all) elsif(User.current.registered?) User.current.theme else nil end I''ve tried using the Association extensions so I can simply call something like @theme = User.current.theme.find_theme e.g class User < ActiveRecord::Base has_one :theme do def find_theme() if(admin?) Theme.find(:all) elsif(registered?) User.current.theme else [] end end end But no joy, this gives method missing. If I change the associ...