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

Already on GitHub? Sign in to your account

Fix the show_tag_class option, that wasnt been added to the tag classes. #60

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

show_for was ignoring options like:

config.show_for_class = 'dl-horizontal'

This PR should fix that.

Anyway, my code doesn't look good enough... I'm accepting suggestions.

Thanks.

Collaborator

nashby commented Mar 26, 2013

Hey, @caarlos0! There is a test for show_for_class config. So could you please add a test for the fix you're submitting?

Hey @nashby.

Apparently, the issue that I fixed is the issue tested with this test, but, I don't know why the test was passing before, because it wasn't working.

I could try to fix the test... but right now, I have no idea about how to do it.

Another thing that doesn't exactly fit here: If I don't want the wrapper tag around each item, what can I do? I didn't found any way to configure in the code... may I do another pull request for this?

Thanks.

Collaborator

nashby commented Mar 26, 2013

Ah, I think I got it. You want to configure this class through show_for html options? So if you want to add additional class to the main wrapper you can use :class param for that:

show_for(@user, class: 'foo')

Hmmm, I didn't knew about that. Yeah, I was trying to do that.

Well, so this PR is useless. Sorry.

About the tag around items, any suggestion?

Thanks and sorry for waste your time.

@caarlos0 caarlos0 closed this Mar 26, 2013

Collaborator

nashby commented Mar 26, 2013

@caarlos0 you can set config.wrapper_tag to nil if you do not want it at all or use wrapper_tag option on attributes.

Ok, again: thank you very much.

On Tue, Mar 26, 2013 at 4:56 PM, Vasiliy Ermolovich <
notifications@github.com> wrote:

@caarlos0 https://github.com/caarlos0 you can set config.wrapper_tag to
nil if you do not want it at all or use wrapper_tag option on attributes.


Reply to this email directly or view it on GitHubhttps://github.com/plataformatec/show_for/pull/60#issuecomment-15484542
.

Atenciosamente,
Carlos Alexandro Becker
http://caarlos0.github.com/about

Collaborator

nashby commented Mar 26, 2013

Glad to help :)

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