Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to joins on AR #1

Merged
merged 1 commit into from
Apr 25, 2011
Merged

Added support to joins on AR #1

merged 1 commit into from
Apr 25, 2011

Conversation

marcelloma
Copy link
Contributor

I don't know if this is the best solution, but simply pass:

render(:json => Provider.for_data_table(self, %w(name fein categories.name county state), %w(name fein)) do |provider|
            ["<%= link_to(provider, provider) %>", provider.fein, provider.category.name, provider.county, provider.state]
          end)

Tested using belongs_to but should work with has_one too.

@jasondew jasondew merged commit e7497be into jasondew:master Apr 25, 2011
@jasondew
Copy link
Owner

looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants