with_fields is helpfully trying to figure out if it should show the 'versions' 
association added by has_paper_trail. It shouldn't, so you should add:

never_show :versions

to your Lead model to stop the permission check.

--Matt Jones

On Feb 23, 2011, at 11:50 AM, Piotroslav wrote:

> Part of stacktrace below:
> 
> NoMethodError in Leads#advance
> Showing app/views/leads/advance.dryml where line #12 raised:
> undefined method `viewable_by?' for #<Version:0xefbe4e0>
> 
> Extracted source (around line #12):
> 9:       <flash-messages/>
> 10:       <h3>Please complete a bid form</h3>
> 11:     </header>
> 12:     <advance-form/>
> 13:   </content:>
> 14: </advance-page>
> 
> RAILS_ROOT: C:/repo-stage
> Full Trace
> 
> C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
> attribute_methods.rb:255:in `method_missing'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/permissions/
> associations.rb:68:in `viewable_by?'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/hobo_helper.rb:323:in
> `can_view?'
> vendor/plugins/hobo/hobo/taglibs/rapid_support.dryml:45:in
> `with_fields'
> vendor/plugins/hobo/hobo/taglibs/rapid_support.dryml:45:in `select'
> vendor/plugins/hobo/hobo/taglibs/rapid_support.dryml:45:in
> `with_fields'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:328:in `_tag_context'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:248:in `new_context'
> C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/
> helpers/capture_helper.rb:129:in `with_output_buffer'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:248:in `new_context'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:328:in `_tag_context'
> vendor/plugins/hobo/hobo/taglibs/rapid_support.dryml:22:in
> `with_fields'
> vendor/plugins/hobo/hobo/taglibs/rapid_core.dryml:33:in `field_list'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:248:in `new_context'
> C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/
> helpers/capture_helper.rb:129:in `with_output_buffer'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:248:in `new_context'
> vendor/plugins/hobo/hobo/taglibs/rapid_core.dryml:32:in `field_list'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:377:in `call'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> template_environment.rb:377:in
> `call_tag_parameter_with_default_content'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> tag_parameters.rb:21:in `call'
> C:/repo-stage/vendor/plugins/hobo/hobo/lib/hobo/dryml/
> tag_parameters.rb:21:in `method_missing'
> vendor/plugins/hobo/hobo/taglibs/core.dryml:55:in `do_'
> and so on...
> 
> 
> On 23 Lut, 17:26, Matt Jones <[email protected]> wrote:
>> Can you post the complete stack trace? It's hard to tell what went wrong 
>> without more context.
>> 
>> --Matt Jones
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Hobo Users" group.
> 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.
> 

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
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.

Reply via email to