ruby - Model with defined attribute returns nil, despite showing a value. Rails 4 Postgres Heroku -


i have set simple rails app, , have deployed heroku. store content displayed on site, have set model content attribute bio, , populate rake task on deploy.

in dev, well. can populate model, reference in controller, , display on page. simple, right?

however once push heroku, can't model return value, desipite seeing on select. example, console yields:

irb(main):006:0> c = content.first => #<content id: 1, bio: "<p class='bio_text'>hunter writer and..."> irb(main):008:0> c.bio => nil 

the value in db, gives?

i'm using rails 4.1.8, hosted on heroku, running postgres 9.8.1.

model:

class content < activerecord::base end 

controller:

class pagescontroller < applicationcontroller   def bio     @bio_content = content.last.bio   end   ...   private    def content_params     params.require(:content).permit(:bio)   end end 


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -