Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Swapnil Agarwal
    @swapagarwal

    So, I turned Prazo (deadline) back into date format rather than string. In the tarefa form, it now looks like this:

    <div class="input">

    <%= f.date_field :prazo %>

    </div>

    And in the page, it looks like this: http://i.imgur.com/rEdLsZP.png

    However, in the actual tarefas feed, the date doesn't show. When the code is this:

    Prazo: <%= feed_item.prazo %>.

    It just shows "Prazo:." with nothing between the text and the period.

    Then I tried with strftime, like this:

    Prazo: <%= feed_item.prazo.strftime("%B %e, %Y") %>.

    Ran the server, the page gave me

    NoMethodError in StaticPages#home

    saying this:

    undefined method `strftime' for nil:NilClass

    Meaning, it thinks feed_item.prazo is nil, even though it understood feed_item.descricao (description) just fine.

    I also tried:

    Prazo: <%= feed_item.prazo.to_formatted_s(:short) %>.

    It gives me the same problem. Thinks it´s nil. So thats what I´m looking into right now.

    About the chat, I went and signed up for gitter, but I´m not sure how it all works. I´m not a chat person. Just hit me up I guess.

    geleiademocoto
    @geleiademocoto
    Hey, so like I said, the problem was in the controller. Now it starts getting into what I'm nervous about, which is connecting the task completion to the change in the pet's attributes, and the change in the attributes to the change in the gif that's shown on the page. So actually, those are two separate things. The first problem is, how to make it so that when a user's task is completed, a certain attribute of the user's pet (say, happiness), which is an integer, goes up by 1 or whatever other number.
    Swapnil Agarwal
    @swapagarwal
    so the date problem is solved, right? cool!
    i'll look into changing the attributes and let you know.
    geleiademocoto
    @geleiademocoto
    I'll look into it right now too. First thing, I think I'm gonna add the attributes to the pet model that I was holding out on, like happiness, so I can make some tests.
    By the way I have not been writing rspec tests for these last few changes. It's wrong, but at this point, trying to remember and figure out how to correctly write all the tests would be an added headache. I'll probably regret this in the future, but.. yeah, I'll just keep going and figure the tests out later.
    geleiademocoto
    @geleiademocoto
    Ok, so first problem I ran into..
    It seems that I can't access @user.pet in root (home.html.erb), even though I can access it on users/show.html.erb
    I also can't access it on pets/_pet.html.erb. I'm sure whatever's going on here is completely simple and obvious, but that's what happens when you go for months without touching a language.
    geleiademocoto
    @geleiademocoto
    It seems that I can create a pet for an user inside rails console, but I can't log in as an user and create a pet inside the website using a form as I would do with a task. It shows me this error: First argument in form cannot contain nil or be empty. Regarding this line: <%= form_for(@pet, method: :create, action: '/pet') do |f| %> which I have also attempted as <%= form_for(@pet, method: :create) do |f| %> and <%= form_for(@pet) do |f| %>
    Hamdi Jomaa
    @hamdij0maa
    Hello
    is there any Kinect C# developers here ?
    Pranav Hippargi
    @pranavhippargi
    @hamdij0maa I developed on it a little bit! Why, what's up?