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

Css class #289

Merged
merged 1 commit into from Jul 26, 2011
Merged

Css class #289

merged 1 commit into from Jul 26, 2011

Conversation

patrick99e99
Copy link
Contributor

added css_class method which will override the default model class if the user provides a css option. Passing in :html => {:class => nil} will result in only a "simple_form" class.

@patrick99e99
Copy link
Contributor Author

sorry! I just realized I forgot to add .compact before the join on line 38.. It should be:

    options[:html][:class] = [SimpleForm.form_class, css_class(record, options[:html])].compact.join(" ")

To prevent any trailing whitespace In case someone does do :html => {:class => nil}...

@carlosantoniodasilva
Copy link
Member

Hey, no problem. Would you mind removing the other commit, and then you can also include this change in this commit? You should be able to use rebase / ammend to do that. (there is no need to close this pull request, just change the commits and do a forced push - Github will do the rest =D). Thanks.

@patrick99e99
Copy link
Contributor Author

I think we're good to go here... Thanks!

@carlosantoniodasilva
Copy link
Member

Here we go! Thanks for your work on that.

carlosantoniodasilva added a commit that referenced this pull request Jul 26, 2011
Change form css class handling to only add the dom class when one is not given to the form call.
@carlosantoniodasilva carlosantoniodasilva merged commit c501e18 into heartcombo:master Jul 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants