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

Comments

Projects
None yet
3 participants
@ujifgc
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

This comment has been minimized.

Show comment
Hide comment
@namusyaka

namusyaka Oct 7, 2013

Member

Thanks for report, I confirmed.

Member

namusyaka commented Oct 7, 2013

Thanks for report, I confirmed.

@namusyaka

This comment has been minimized.

Show comment
Hide comment
@namusyaka

namusyaka Oct 7, 2013

Member

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

Member

namusyaka commented Oct 7, 2013

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

This comment has been minimized.

Show comment
Hide comment
@dariocravero

dariocravero Oct 7, 2013

Contributor

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.

Contributor

dariocravero commented Oct 7, 2013

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

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Oct 7, 2013

Member

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

Member

ujifgc commented Oct 7, 2013

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

@dariocravero

This comment has been minimized.

Show comment
Hide comment
@dariocravero

dariocravero Oct 7, 2013

Contributor

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?

Contributor

dariocravero commented Oct 7, 2013

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

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Oct 7, 2013

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@dariocravero

dariocravero Oct 7, 2013

Contributor

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

Contributor

dariocravero commented Oct 7, 2013

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

@namusyaka

This comment has been minimized.

Show comment
Hide comment
@namusyaka

namusyaka Oct 7, 2013

Member

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

Member

namusyaka commented Oct 7, 2013

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

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Oct 7, 2013

Member

Thanks @namusyaka for the fast fix!

Member

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