Created
September 25, 2008 08:25
-
-
Save Mikr0Tik/12783 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template = 'people' # depends on the template | |
... | |
@nested_object = self.instance_variable_get(:"@#{params[:controller].singularize}") if show_action? | |
... | |
attributes.each do |attribute| | |
route = @nested_object ? self.send("#{params[:controller].singularize}_#{template}_path", @nested_object, {:order=>order}) : self.send("#{params[:controller]}_path", {:order=>order}) | |
link_to('Fooo', route) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment