Permalink
Browse files

contact_id hardcoded somewhere else

  • Loading branch information...
1 parent c65df2f commit 4943a1a5519a80fbd00451ce1a4ca26aa19d880d @zekus committed Apr 18, 2012
Showing with 5 additions and 2 deletions.
  1. +3 −1 app/models/task.rb
  2. +1 −1 app/views/layouts/application.html.erb
  3. +1 −0 app/views/tasks/_form.html.erb
View
@@ -1,9 +1,11 @@
class Task < ActiveRecord::Base
attr_accessible :name
+ validate :name, :presence => true
+
after_save :pushbase
def pushbase
- Basecrm.new(:name => name)
+ Basecrm.new(:name => name, :contact_id => '4889876')
end
end
@@ -7,7 +7,7 @@
<%= csrf_meta_tags %>
</head>
<body>
-
+The tasks will be added to the user 4889876 by default.
<%= yield %>
</body>
@@ -15,6 +15,7 @@
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
+
<div class="actions">
<%= f.submit %>
</div>

0 comments on commit 4943a1a

Please sign in to comment.