ruby on rails form action showing dot - ruby-on-rails-4.2

I am using
link_to account.name, edit_account_path(account.id)
which is generating
form class="edit_account" id="edit_account_2" action="/account.2"
instead of
form class="edit_account" id="edit_account_2" action="/account/2"
Can someone advise why?
Thanks in advance!

Related

How to choose a radiobuttton without id with selenium webdriver and VBA

I am trying to automate the navigation of a website. I cannot choose a radio button using the methods I know so I hope someone can guide me. Here is the html:
I have tried different versions of
bot.FindElementByClass("css-k2m43g-RadioWrapper ewsdbue1").Click
bot.FindElementByClass("css-njdfi2-NativeRadio ewsdbue3").Click
bot.FindElementByClass("css-34xfl3-CustomStyledRadio ewsdbue2").Click
but that crach the VBA.
Any suggestions?
Try css attribute = value selector
bot.FindElementByCss("[type=radio]").click

Sharepoint SPFx ${} replace slash with space in render method

I'm pretty new to spfx client side development model and there is some stuff that I don't understand.
In sharepoint webpart (SPFx) I'm trying to dynamically load an image src, but if I do: src="${item.ImageUrl}" the slashes (/) are replaced by spaces. But if I do it manually: src="https://picsum.photos/720/300/?image=0", the image is shown without problem.
Any help would be appreciated!
Thanks!
It was my mistake!
<img class="${styles.image} src="${item.ImageUrl}" alt="${escape(item.Title)}" />
Its missing the " after the class styles, so for a strange reason the url makes that thing.
This teach me a valuable lesson. If something doesn't work just go home and try tomorrow :)

Custom Jade Renderer

I would like to change the code before or after jade render HTML. I need to change the code to add some specific functions. For example
h4#headline Click to register
a(href="myLink", data-type="foo") Here
I would like to prepare all links or html tags with data-type by the value in the tag.
Is that possible or has anybody experience with that?
Thanks for help!

LifeRay form validation using Alloy UI

I use LifeRay 6.1.2. And it have built-in Alloy UI 1.5. framework. So I try to reproduce this form validation example (I copied all code), but it don't work as expected (error labels in DOM, but they are don't visible in form (see EDIT1)):
Expected result is (you can try yourself live example using link provided above):
Where is problem? How to solve it? Thanks.
EDIT1:
After some research, I realized that if I delete aui-form-validator-message CSS class from error message's DIV tag (it generated by LifeRay, I'm not adding it), then error message become visible. Strange..
You should post your own code, or it's difficult to answer.
Anyway if you want you could try the aui validator tag for example:
<aui:input name="name" value="${name}" label="name">
<aui:validator name="required" errorMessage="your-message-here"></aui:validator>
</aui:input>
learn more # http://drewblessing.com/blog/-/blogs/34509
Hope it helps!
I think you have not used the tag in your code.
<script src="http://cdn.alloyui.com/2.0.0/aui/aui-min.js"></script>
Paste this and check.

CLEditor deault text from query

I have a textarea that displays a text I get from a query. But this textarea runs the CLEditor plugin and execute the website does show the "CLEditor area" empty. How would you add default text in the plugin? For example:
<textarea id="areaEdit" name="areaEdit"><?php echo $row['myText'] ?></textarea>
I hope your help, thank you very much.
p.d. sorry for my english.
That is how you would do it. Did you confirm that the data of $row['myText'] actually is valid and has a value? Comment out the CLEditor code and see if it shows up in a basic textarea.

Resources