I just now upgraded one of my sites to use Rails 3.0.17, and suddenly found
that the search stopped working. I have been able to trace this back to the
rapid_core.dryml file, line 170-189, where the hobo-rapid-javascripts tag
is defined:
<def tag="hobo-rapid-javascripts">
> <script type="text/javascript" param="default"><%=
> res = 'var hoboParts = {};'
> # FIXME: This should interrogate the model-router - not the models
> unless Hobo::Model.all_models.empty?
> # Tell JS code how to pluralize names, unless they follow the
> simple rule
> names = Hobo::Model.all_models.map do |m|
> m = m.name.underscore
> "#{m}: '#{m.pluralize}'" unless m.pluralize == m + 's'
> end.compact
> res << "var pluralisations = {#{names * ', '}}; "
> end
> base = [base_url, subsite].compact.join("/")
> res << "urlBase = '#{base}'; hoboPagePath = '#{request.fullpath}'"
> if protect_against_forgery?
> res << "; formAuthToken = { name:
> '#{request_forgery_protection_token}', value: '#{form_authenticity_token}'
> }"
> end
> res
> %></script>
> </def>
>
The problem is that the single-quotes in the code where urlBase and
formAuthTokenis set ends up like this in the output:
> <script type="text/javascript">var hoboParts = {};var pluralisations = {};
> urlBase = ''; hoboPagePath = '/'; formAuthToken = {
> name: 'authenticity_token', value:
> '1ySDOslOqF4X+kJabKIuqq7K9Vn/C1wqU3dYkOlbA24=' }</script>
>
How can I prevent this from happening? Or should I roll back to 3.0.16 (or
15 or ...)?
Regards,
Ronny
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/-FjNfi6rg1UJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.