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

HTML code on help section #211

Closed
soullivaneuh opened this issue Mar 30, 2015 · 6 comments
Closed

HTML code on help section #211

soullivaneuh opened this issue Mar 30, 2015 · 6 comments

Comments

@soullivaneuh
Copy link

Hi.

I have the following form code:

  = f.text_area :redirect_uri, help: 'Use one line per URI'

I have some extra conditional help to add, based on this old code:

  - if Doorkeeper.configuration.native_redirect_uri
  %span.help-block
    Use
    %code= Doorkeeper.configuration.native_redirect_uri
    for local tests

How can I override the help block to do some logic inside? Is that possible with this library?

Thanks.

@datWav
Copy link

datWav commented Apr 24, 2015

At this point this is not possible. Maybe you should call a helper method for this logic.
Maybe it is usefull if we can specify more than more help text.

@soullivaneuh
Copy link
Author

Maybe you should call a helper method for this logic.

Do you have some recommendations of how this helper should be? Thanks.

@datWav
Copy link

datWav commented Apr 24, 2015

Idk...Maybe something like this one (not tested):

def method_name help_text, condition, condition_help_text
  if condition
    help_text.concat(condition_help_text)
  end
  help_text 
end

@soullivaneuh
Copy link
Author

@datWav So something separated from the form? Not the must isn't it?

Do you think html help block could be easily implemented on this library?

Regards

@datWav
Copy link

datWav commented Apr 28, 2015

At the moment it is only possible with a separated form.
How should the method call be?

@mattbrictson
Copy link
Contributor

Cleaning up old unanswered issues. If this question is still relevant, please reopen.

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

3 participants