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

form create and edit #10

Open
nunziofiore opened this issue Oct 13, 2011 · 1 comment
Open

form create and edit #10

nunziofiore opened this issue Oct 13, 2011 · 1 comment

Comments

@nunziofiore
Copy link

HI,

thank you for your gem...
I'm searching a simple demo also of the edit end new form of a model where is used puret... can you help me please???

@wolfgangihloff
Copy link

I would appreciate the same.
I created a new project, scaffold User name:string location:string
Create one user, works
Add puret gem, do generator for User works, run migration done.
go to user page index
previously user shows up with no info in index listing, I set the default locale in application.rb to en, no change
I create a second user with create, he gets a new entry in the translation table
this second user shows correct in index and show action
however when I edit this second user, the form_for is not prefilled with existing data

So what am I missing:

  • is as soon as puret is installed all data that is sitting in the original model table, that is now supposed to be translated omitted, I though the default locale would be looked up from there, but I see also for en the data being created in the _translations table
  • why doe the form_for not prefill the data?

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

No branches or pull requests

2 participants