#date to timestamp
start_date = DateTime.now
timestamp = start_date.to_time_to_i
#Timestamp to date again
start_date_again = Time.at(timestamp)The problem seems to be due to client_side_validations version
so use
gem 'client_side_validations', '3.1.0'
in gemfile and run bundle update
<%=link_to (raw("<span>Link Title</span>"), path) %>This is due to missing key in [] when you are creating form for child attributes. Multiple entries are there and this behaves as array instead of hash causing problem. Solution is to add key there you can use timestamp as ke as that is unique
testhash = {:active => 1, :blocked => 2, :pending => 3}
testhash.map{ |k,v| v==2 ? k.to_s.capitalize! : nil }.compact
It will display result "Blocked"This is due to missing module file like my_module.rb in my_module directory for Module named MyModule
or
Due to duplicate class existence
# models/user_observer.rb
class UserObserver < ActiveRecord::Observer
def after_create(user)
# Send Registration Email
CustomMailer.registration_email(user).deliver
end
endrvm implode
# This will uninstall the RVMconfig.use_custom_slugs = true def request
@request = Request.find_by_request_id!(params[:id])
respond_to do |format|
format.html {render :layout => "landing", :template => "requests/newrequest"}
format.json { render :json => {:request => @request} }
end
end
# ! rescue and redirect to 404 page if no record exists for params[:id]