Displaying 20 results from an estimated 700 matches similar to: "Help troubleshooting save"
2005 Jul 23
11
Validation without ActiveRecord
Hello, I followed the instructions at
http://wiki.rubyonrails.com/rails/show/HowToUseValidationsWithoutExtendingActiveRecord
But now I''m having trouble trying to create my form view.  Here''s a
brief rundown of what I''ve done:
- Created a class called SearchRequest that extends ValidatingBase and
saved it in a file called search_request.rb and put it in my models
2005 Jul 27
7
Oracle OCI8, or "am I going crazy?"
All of a sudden, on three different systems, the "server_ip_address/sid_name" 
syntax in database.yml has stopped working for me.
I can''t even do a OCI8.new(blah blah blah) statement from an IRB shell.
I get "ORA-12541: TNS:no listener", or some variant, depending on how I phrase it.
On systems where I have a real deal client installed, and OCI can find the 
tnsnames
2012 Aug 28
3
date in plot, can't add regression line
Hello all,
I have been using R for about 3 weeks and I am frustrated by a problem.  I have read R in a nutshell, scoured the internet for help but I either am not understanding examples or am missing something completely basic.  Here is the problem:
I want to plot data that contains dates on the x axis.  Then I want to fit a line to the data.  I have been unable to do it.
This is an example of
2010 Sep 20
5
Update to website not printing special Characters
I thought you might be interested in how far I have got with solving
my problem with MySql(via phpMyAdmin) to website character_set
problems.
I thought I had solved the problem when my characters on my website
started showing the special characters.
This was a partial success though.
When I went back to phpMyAdmin and entered new text the problem was
the same, but reversed. What now happens is
2008 Jan 21
1
Mysql collations error
Hello,
I am having this mysql error in my ruby on rails application.
 ActiveRecord::StatementInvalid occurred in
>  event#lg:
>  Mysql::Error: Illegal mix of collations
> (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for
> operation ''='': select * from locations where country = ''HU'' and
> geo_state = ''08'' and city
2006 Apr 26
5
accessing created_on causes type error
I assume that this is some newbie stupidity, but I haven''t found my 
way around this problem.  I have an ActiveRecord object fetched 
from the database, and I need to evaluate the contents of the 
updated_on field.  However, *any* attempt to access that data in the 
program results in a TypeError with the message ''no implicit conversion
from nil to integer''.  
cust =
2006 Apr 16
2
conditional updated_on update
Hi list,
I''ve got some counter_caches in a model. When these get incremented - say on
a page view - my updated_on column also gets updated. How can I
conditionally not update updated_on if just these counter_cache columns
change?
The problem with that is that I am using acts_as_versioned which clones the
record each time updated_on changes. I am successfully ignoring the
counter_cache
2006 May 29
6
override automatic update of updated_on column
i know that title sounds confusing, but here is the deal:
the two columns that we are concerned with for this question are the "updated_on" column and the "views" column.  the views column increases everytime a user visits a certain page.  like this:
@object.update_attributes(:views => @object.views + 1)
the problem is that when a user visits the page, it AUTOMATICALLY
2006 May 31
3
detecting changed data
I am working on an application where there are many different screens to
access the data in a particular record/row. I have links to each data
entry screen at the top. Is there a way to detect whether the current
hash has been changed from the stored record so I can prompt the user if
they attempt to change screens without having saved their changes to the
data?
Craig
2006 Apr 25
4
Newbie - Grouping of items...
I''m trying to build a dashboard type page (similar in function to 
basecamp''s) where I can show the last 5 updated items from my 3 
differing models, then grouped together by project.
Solution ideas:
(1) Is it best to create a log model where everytime I add or update 
another model (like messages, comments, lists etc) an enrty gets added 
to the log along with the project. I
2005 Dec 22
3
help with unless
Hi,
I need a fresh set of eyes to look at this bit of controller code and tell
me why I might be getting an error message:
        lookup = Profit.find(:all, :conditions => [ "user_id = ? AND
product_id = ?", uid, pid])
        unless lookup.empty?
            if (lookup.updated_on > 360.minutes.ago)
                return
            end
        end
If lookup is empty, then I
2006 Apr 14
4
Newbie stuff (.new method)
Hi-
Ruby 1.8.2 Rails 1.1
so I''m trying to build my first rails app and I''m trying to understand 
how the helper methods work.  For instance .new & .save . For instance, 
I''ve created a table of Objects, and generated a scaffold.  I see that 
in the controller, there are calls to Object.new and Object.save.  I''m 
assuming that these are methods inherited
2008 Sep 04
3
MySQL connection collation
Hi!
I have ran on problem with collations. In database.yml I have set:
encoding: utf8, but when in console run:
>> ActiveRecord::Base.connection.collation
=> "latin1_swedish_ci"
It is Rails 2.1, mysql gem 2.7, mysql 5.1.22. This leads to errors like:
Mysql::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation
2005 Dec 19
3
created_on, created_at defaulting to 2000/01/01 00:00:00
Hello all,
Rails 1.0.0
created_on is being set to 2000/01/01 00:00:00
Any ideas on this ?
Thanks!
Schema is
create table user_login_history (
id int identity(1,1) not null,
user_id int not null,
created_on datetime default(getdate()) not null,
created_at datetime default(getdate()) not null,
updated_on datetime default(getdate()) not null,
constraint pk_user_login_history primary key clustered
2005 Dec 23
4
OO model style: inheritance
Hi everybody
I am totally new to rails and I am trying to start a
tiny project to get familiar with rails. But I already
got my first problem and I would be happy if somebody
could point me in the best and cleanest direction.
I am trying to develop a small gallery app. Since I
would like to add more features in future I am trying
to design a clean OO architecture of my models:
The base object
2005 Aug 07
8
Ajax forms and redirects
Here is an example that seems perfect for Ajax that I have not seen
implemented nor can figure out how to do it. I am hoping someone can
give me some pointers.
On the sign-up page, I would like to do my validations (password
length, username uniqueness,etc ) Ajax-style. But if all validates,
then redirect to the success page. The combining of redirection to a
new page with Ajax is throwing me.
2006 Jun 20
3
find ''newest'' of a model
I have a model which has the created_on and updated_on fields.  I would
like to find the newest instances of my model from the database(for
instance, last 10), but as I''m only 6 weeks into my Rails development, I''m
not entirely sure how to do it.  Any suggestions?
Thanks,
David
2007 Aug 14
1
find_by_sql vs connection.select_all
I was trying to do SUM based mySQL query simliar to the following:
SELECT SUM(updated_on - created_on) AS total from signups
If I were to run this command in the mySQL console I would get a
result.  However, if I were to run it using the following command in
Rails:
Signup.find_by_sql("SELECT SUM(updated_on - created_on) AS total from
signups")
The query that is written to the log is:
2005 Aug 10
24
Multilingual Rails v0.5. Big update!
Multilingual Rails v0.5 is just released with lots of new features.  
Here is the changelog:
v0.5: New charset conversion string-methods. Multilingual Rails  
always use UTF-8 internally.
         iconv_to(charset)    # Return string as charset
         iconv_from(charset)  # Return string as UTF-8, converted  
from charset
         iconv_from!(charset) # Convert string from charset to UTF-8
    
2006 May 24
1
AR many-many join tables - can they have created_on, updated_on ?
Hello all,
I''m creating a many-many join table between ''homes'' and ''users''.  Can it
contain created_on?  will AR update created_on, updated_on on this table?
CREATE homes_users (
home_id int not null,
user_id int not null,
created_on datetime null,
updated_on datetime null
)
Thanks for your advice!
-- 
------------------------------
Apple MacBook.