Code Monkey home page Code Monkey logo

Comments (5)

flyerhzm avatar flyerhzm commented on June 1, 2024

it should be bullet's fault

from bullet.

flyerhzm avatar flyerhzm commented on June 1, 2024

could you print the full stack trace?

from bullet.

spilth avatar spilth commented on June 1, 2024

To re-iterate, this code works fine when Bullet is not enabled.

Here's what gets spit out in the logs:

ActionView::Template::Error (undefined method `id' for nil:NilClass):
    67:                 <%= attribute_row("Lifecycle Status", @computer.lifecycle_status) %>
    68:                 <%= attribute_row("SLA Category", @computer.sla_category) %>
  app/views/computers/show.html.erb:67:in `_app_views_computers_show_html_erb__1240088445419677836_2176536420'
  app/controllers/computers_controller.rb:57:in `show'

Rendered /Users/bkelly1271/.rvm/gems/ruby-1.9.2-p290@global/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.2ms)
Rendered /Users/bkelly1271/.rvm/gems/ruby-1.9.2-p290@global/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms)
Rendered /Users/bkelly1271/.rvm/gems/ruby-1.9.2-p290@global/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (5.3ms)

And here's part of the model's defitinion:

class Computer < ActiveRecord::Base
  belongs_to :lifecycle_status
  belongs_to :sla_category

The attribute_row method is a simple helper:

def attribute_row(name, value)                                                                                                                            
  content_tag(:tr) do                                                                                                                                     
    content_tag(:th, name) +                                                                                                                              
    content_tag(:td, value)                                                                                                                               
  end                                                                                                                                                     
end

from bullet.

flyerhzm avatar flyerhzm commented on June 1, 2024

did you try the latest bullet?

from bullet.

spilth avatar spilth commented on June 1, 2024

I updated to 4.1.6 (from 2.3.0) and am no longer having this problem.

from bullet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.