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

Admin with slim is broken #1434

Closed
ujifgc opened this issue Oct 7, 2013 · 9 comments
Closed

Admin with slim is broken #1434

ujifgc opened this issue Oct 7, 2013 · 9 comments
Milestone

Comments

@ujifgc
Copy link
Member

ujifgc commented Oct 7, 2013

This commit breaks slim Admin pages: forms content is duplicated: 02e643e

Steps to reproduce:

padrino g project test -e slim -d datamapper
padrino g admin
rake db:migrate
padrino s
@ghost ghost assigned namusyaka Oct 7, 2013
@namusyaka
Copy link
Contributor

Thanks for report, I confirmed.

@namusyaka
Copy link
Contributor

If we use = form_tag... instead of - form_tag.., it works well.
However, I think this behavior is not correct. What do you think?

@dariocravero
Copy link

It happens on haml too. Erb doesn't have the issue. Using = form_tag... "solves" it on slim and haml. Erb fails if =... is used.

@ujifgc
Copy link
Member Author

ujifgc commented Oct 7, 2013

There should be some convention how to capture blocks in slim, haml, erb templates.

@dariocravero
Copy link

Looking back at slim and haml docs, I have a feeling that the right approach should be to use = instead of -.
- should be used for control code and = for output. See this and this. Thoughts?

@ujifgc
Copy link
Member Author

ujifgc commented Oct 7, 2013

So, according to official docs slim and haml should capture on =. Vanilla erb captures on -, Rails-flavored erb captures on =.

After merge 02e643e our rendering does official slim, haml, erb, right?

Then we should fix our admin generators and break a lot of user apps. A good change for 0.12 I think.

@dariocravero
Copy link

I agree with that. @padrino/core-members?

@namusyaka
Copy link
Contributor

I agree. In any case, we also should fix this.

@ujifgc
Copy link
Member Author

ujifgc commented Oct 7, 2013

Thanks @namusyaka for the fast fix!

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

No branches or pull requests

3 participants