Skip to content

Instantly share code, notes, and snippets.

View deepakprasanna's full-sized avatar

Deepak Prasanna deepakprasanna

View GitHub Profile
ActiveRecord::RecordInvalid in DocumentsController#create
Validation failed: Role has already been taken
RAILS_ROOT: /home/deepak/artha-intranet
Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:1021:in `save_without_dirty!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/dirty.rb:87:in `save_without_transactions!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in `save!'
Processing UsersController#new (for 127.0.0.1 at 2009-06-08 12:41:20) [GET]
ActionView::MissingTemplate (Missing template users/new.erb in view path app/views:vendor/plugins/watchman/app/views):
/usr/lib/ruby/gems/1.8/gems/haml-edge-2.1.24/lib/sass/plugin/rails.rb:19:in `process'
Rendering rescues/layout (internal_server_error)
(function($) {
var doc_helpers = {};
doc_helpers.initialized = false;
doc_helpers.init = function(el)
{
$.ajax({url: '/sections/',
error: function(xmlHttpRequest, text, excp){
console.log("An error occured while getting /sections/");
},
success: function(data, textStatus){
<html>
<body>
<h2>Forums</h2>
<br />
<select id="forum_list">
<% for forum in @forums %>
<option value ="<%= forum.id %>"><%= link_to h(forum.name), forum_path(forum.id) %></option><br />
<b>Description :</b><%=h forum.description %><br />
<b>Total Topics :</b><%=h forum.topics.count %><br /><br />
<%= link_to "Show", forum_path(forum) %>
NameError in HomesController#index
uninitialized constant ApplicationHelper::AuthHelper
RAILS_ROOT: /home/deepak/artha-intranet
Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing'
/home/deepak/artha-intranet/app/helpers/application_helper.rb:3
1) Error:
test: document in a ds_admin login should download on clicking the respective link. (DocumentsControllerTest):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.get_file
app/models/document.rb:53:in `get_latest_revision'
app/controllers/documents_controller.rb:56:in `load_file'
/usr/lib/ruby/gems/1.8/gems/haml-edge-2.1.24/lib/sass/plugin/rails.rb:19:in `process'
functional/documents_controller_test.rb:74:in `__bind_1248847869_460334'
/usr/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.1/lib/shoulda/context.rb:253:in `call'
/usr/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.1/lib/shoulda/context.rb:253:in `test: document in a ds_admin login should download on clicking the respective link. '
$("#submit").click(function(){
if($("#password_error").length != 0){
el.remove(this);
}
});
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
<%= devise_error_messages! %>
<% require 'pp' %>
<%= pp resource %>
<p><%= f.label :first_name %><br />
<%= f.text_field :first_name %></p>
<p><%= f.label :last_name %><br />
<%= f.text_field :last_name %></p>
class User
include Mongoid::Document
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
field :first_name
field :last_name
field :title
module Search
def self.included(model)
model.class_eval do
include Search::InstanceMethods
extend Search::ClassMethods
end
end
module InstanceMethods
end