This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.0.0p195 :027 > Task.last | |
Task Load (0.4ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1 | |
=> #<Task id: 13, title: nil, task_category_id: nil, due_date: "2013-07-28 18:11:00", description: "Hello", completed_at: nil, company_id: 5, contact_id: 0, user_id: nil, created_at: "2013-07-28 18:11:00", updated_at: "2013-07-28 18:11:00"> | |
2.0.0p195 :028 > Task.where(due_date: Date.today) | |
Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."due_date" = '2013-07-28' | |
=> [] | |
2.0.0p195 :029 > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == Schema Information | |
# | |
# Table name: tasks | |
# | |
# id :integer not null, primary key | |
# title :text | |
# task_category_id :integer | |
# due_date :datetime | |
# description :text | |
# completed_at :datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="add-task arrow_box hide"> | |
<%= form_for ([@company, @task]), :remote => true do |f| %> | |
<%= f.label :description %> | |
<%= f.text_field :description, :class => "input-width bottom-border" %> | |
<%= f.label :task_category_id, "Choose a category" %> | |
<%= f.collection_select(:task_category_id, TaskCategory.all, :id, :task_category) %> | |
<%= f.label :due_date %> | |
<%= f.select :due_date_word, ['Today', 'Tomorrow', 'Next Week']%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/assets/companies.js?body=1" for 127.0.0.1 at 2013-07-29 17:47:00 +0300 | |
Served asset /companies.js - 304 Not Modified (0ms) | |
Started GET "/assets/contacts.js?body=1" for 127.0.0.1 at 2013-07-29 17:47:00 +0300 | |
Served asset /contacts.js - 304 Not Modified (0ms) | |
Started GET "/assets/colorbox-rails/jquery.colorbox-min.js?body=1" for 127.0.0.1 at 2013-07-29 17:47:00 +0300 | |
Served asset /colorbox-rails/jquery.colorbox-min.js - 304 Not Modified (0ms) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Post < ActiveRecord::Base | |
belongs_to :user | |
before_save :default_values | |
def default_values | |
self.cached_votes_total ||= 1 | |
end | |
acts_as_votable | |
end |
OlderNewer