After the fix hobo is generating auto rapid pages in different manners at 
different times.

For example audo/rapid/cards.dryml

@@ -220,6 +220,11 @@

    <header: param>

      <h4 param="heading"><a><name/></a></h4>

    </header:>

+    <body: param>

+      <ht key="book.collection.count" count="&this.books.size">

+         <count:books param/>

+      </ht>

+    </body:>

   </card>

 </def>

audo/rapid/pages.dryml
 <def tag="new-page" for="EBook">
-  <page merge title="#{ht 'e_book.new.title', :default=>[' New EBook'] }">
+  <page merge title="#{ht 'e_book.new.title', :default=>[' New E book'] }">
     <body: class="new-page e-book" param/>
 
     <content-header: param>
       <h2 param="heading">
         <ht key="e_book.new.heading">
-          New EBook
+          New E book
         </ht>
       </h2>
     </content-header:>

Explanation. EBook is the model name. "E Book" is the value of 
activerecord.models.e_book in the translation file.

It looks as if there are more than one page generator. It is possible to 
escape wrong generation by simply not checking in those files but it's very 
disturbing.
Where can I hunt for a bug fix?

Umur

On Saturday, January 31, 2015 at 7:41:40 AM UTC+1, umuro wrote:
>
> You'r welcome :)
>
> A slight fix is needed. The version above is not running in the test 
> environment. Here is the new version. 
>
> *config/application.rb*
>     config.to_prepare do
>       require 'bug_fix'
>       ::BugFix.apply
>     end
>
> *lib/bug_fix.rb*
> module BugFix
>
>
>   def self.apply
>     BugFix::ActiveRecord.apply
>   end
>   
>   module ActiveRecord
>     
>     def self.apply
>       ::ActiveRecord::Base.descendants.select do |k|
>         k.reflections.values.each do |r|
>           r.instance_eval{ @klass = Object.const_get(@klass.name) if 
> @klass }
>         end
>       end
>       true
>     end
>
>
>   end
>   
> end
>
>
> I spent quite a while wondering why my application is telling "Hobo can't 
> find reverse association for sth". All the models were correct. Then I 
> found out DRML editing was causing class reload. Then I found out Rails was 
> wrong about reloading files.
>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to