Comments on: The Learning Curve of Ruby on Rails https://www.keithwatanabe.net/2013/04/09/the-learning-curve-of-ruby-on-rails/ Hitting Where It Hurts and Making the Universe Like It Tue, 09 Apr 2013 12:31:56 +0000 hourly 1 https://wordpress.org/?v=7.0 By: keithyw https://www.keithwatanabe.net/2013/04/09/the-learning-curve-of-ruby-on-rails/#comment-1892 Tue, 09 Apr 2013 12:31:56 +0000 http://www.keithwatanabe.net/?p=829#comment-1892 Okay cancel my last comment and the stupid attr_accessor issue. The problem was that I didn’t have certain attributes in my migration. So I ended up doing a rollback, adding the attributes into the migration and now the form displays fine using my dynamic generation technique. Ugh what a mess.

]]>
By: keithyw https://www.keithwatanabe.net/2013/04/09/the-learning-curve-of-ruby-on-rails/#comment-1891 Tue, 09 Apr 2013 12:12:03 +0000 http://www.keithwatanabe.net/?p=829#comment-1891 Turns out that I was wrong about the whole dynamic attribute thing with my form. I ended up not being able to persist any data since attr_accessor ends up overriding something internally, which prevents the model from inserting/updating into the database. I tried removing the attr_accessor elements but ended back up at square zero with the “undefined method” issue. So I concluded that for now I’ll just have to hard code all this stupid shit into the view. This is pretty retarded. I’m surprised there are no solutions on the web that describe how to handle this situation.

]]>