{"action":"reopened","issue":{"url":"https://api.github.com/repos/ga-dc/pbj-project2/issues/154","labels_url":"https://api.github.com/repos/ga-dc/pbj-project2/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/ga-dc/pbj-project2/issues/154/comments","events_url":"https://api.github.com/repos/ga-dc/pbj-project2/issues/154/events","html_url":"https://github.com/ga-dc/pbj-project2/issues/154","id":99464369,"number":154,"title":"Issue with conditional statement in the view","user":{"login":"edwardpark","id":7883907,"avatar_url":"https://avatars.githubusercontent.com/u/7883907?v=3","gravatar_id":"","url":"https://api.github.com/users/edwardpark","html_url":"https://github.com/edwardpark","followers_url":"https://api.github.com/users/edwardpark/followers","following_url":"https://api.github.com/users/edwardpark/following{/other_user}","gists_url":"https://api.github.com/users/edwardpark/gists{/gist_id}","starred_url":"https://api.github.com/users/edwardpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwardpark/subscriptions","organizations_url":"https://api.github.com/users/edwardpark/orgs","repos_url":"https://api.github.com/users/edwardpark/repos","events_url":"https://api.github.com/users/edwardpark/events{/privacy}","received_events_url":"https://api.github.com/users/edwardpark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-06T15:38:59Z","updated_at":"2015-08-06T15:40:58Z","closed_at":null,"body":"this is on github > branch :: ajax4sheezy \r\nI have a medication reminder application, with the main page showing all of the reminders that match a .where query interval = \"morning\".\r\n\r\nin the display I have am trying to populate it so that upon load it checks to see if the reminder.taken = true (as in they have taken their medication) and if so a corresponding button called \"taken?\" would be given a style = display:none; attribute. \r\n\r\nhere is the view code: \r\n\r\n```  <ul class=\"nav nav-tabs nav-stacked\">\r\n        <% @morning_reminders.each do |f| %>\r\n            <li>\r\n            <%= f.medication.name %>, (<%= f.medication.dosage %>)\r\n              <% if f.taken = true %>\r\n              <% binding.pry %>\r\n                  <%= button_to \"Take?\", medication_reminder_path(f.medication,f),method: :put,remote: true,style:\"display:none;\"  %>\r\n              <% else %>\r\n                <%= button_to \"Take?\", medication_reminder_path(f.medication,f),method: :put,remote: true  %>\r\n              <% end %>\r\n            </li>\r\n        <% end %> ```\r\n\r\nbut when it loads it's just hiding all of the buttons. oddly also when I stuck a binding.pry in there and investigated it showed that the reminder taken property was \"true\" \r\n\r\n``` => #<Reminder:0x007f8435aeaf90\r\n id: 17,\r\n interval: \"morning\",\r\n taken: true,\r\n medication_id: 5,\r\n created_at: Thu, 06 Aug 2015 15:10:15 UTC +00:00,\r\n updated_at: Thu, 06 Aug 2015 15:10:15 UTC +00:00>\r\n[2] pry(#<#<Class:0x007f8436ade780>>)> exit\r\n\r\n```\r\n\r\nbut I literally just created it so I knew it was false or nil and looked into the db : \r\n\r\n![screen shot 2015-08-06 at 11 34 54 am](https://cloud.githubusercontent.com/assets/7883907/9115932/9e2d0244-3c2f-11e5-8c33-ad1d8145f1b6.png)\r\n\r\nand sure enough id: 17  is not true . \r\n\r\n"}}