Re: [Rails] Re: Please, help to solve the problem

2012-08-05 Thread soldier
require active_support/core_ext/date/acts_like miss this for acts_like_date? function. i think you can easy to this. require 'active_support/core_ext' puts 0.months.since Date.current On Mon, Aug 6, 2012 at 1:06 AM, koulikoff koulik...@gmail.com wrote: On Sunday, August 5, 2012 7:05:11 PM

Re: [Rails] Can't get even a simple Rails app to run? blocked by “ERROR TypeError: can't dup NilClass”

2012-02-12 Thread soldier
Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2

Re: [Rails] Re: Re: Rails on Windows, so slow

2011-01-18 Thread soldier
you can use vs2010 recompile the source code. i test it faster than rubyinstaller. On Wed, Jan 19, 2011 at 2:00 AM, Rimantas Liubertas riman...@gmail.com wrote: Absolutely! If you need training wheels go with the Apple OS. Which happens to be certified UNIX… When you are ready, reward

[Rails] why observer can't fire in rspec? help .

2010-12-31 Thread soldier
I read the guide and api and i created Observer on model, she can run on rails console of test env. but when i use rspec , the observer can't run in, it's never step in. some good man help me, please. i debug it use one day and one night, i can't sleep in today night unless i solve it. -- You

Re: [Rails] What is Mass Assignment Can you give me a clear idea about that with an example

2010-12-31 Thread soldier
you can use attr_accessible. On Fri, Dec 31, 2010 at 11:06 AM, Amar Jampa li...@ruby-forum.com wrote: What is Mass Assignment?  Can you give me a clear idea about that with an example? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

Re: [Rails] Re: why observer can't fire in rspec? help .

2010-12-31 Thread soldier
-application On Dec 31, 5:06 am, soldier 8863...@gmail.com wrote: but when i use rspec , the observer can't run in, it's never step in. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t

Re: [Rails] hello

2010-09-24 Thread soldier
i cound't visted it . On Fri, Sep 24, 2010 at 5:33 AM, Tyler Jennings tyler.jenni...@gmail.com wrote: Dear Friends: Some time ago. A friend  Had  birthday. ordered my friend a birthday present: New Apple iPhone 4G HD 16GB Black Unlocked 1Year Warranty I ordered products in China website. My

[Rails] how to load js in ajax.?

2010-05-10 Thread soldier
I can't loading my javascript when I use ajax replace local html. Can anybody help me? thanks. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from

Re: [Rails] Re: how to run a cron file

2010-05-10 Thread soldier
first, you can debug the shell in the console until success. and you can write the shell in sh file,like this: run.sh: export RAILS_ENV=production /usr/bin/ruby ~/1.rb . crontab file * * * * * sh ~/run.sh 2010/5/11 Jeffrey L. Taylor r...@abluz.dyndns.org: Quoting Manish Nautiyal

Re: [Rails] Calling destroy on a model that has no id column

2010-04-21 Thread soldier
what's content of params[:id], why not use favorite_id; 2010/4/22 Lee Smith autige...@gmail.com: I've got a model, Favorite, that I'm trying to remove from the database by calling the destroy method on it.  What's noteworthy about this model is that it doesn't have an id column.  The unique

Re: [Rails] Re: Calling destroy on a model that has no id column

2010-04-21 Thread soldier
i think rails must be use table's id colunm. 2010/4/22 Lee Smith autige...@gmail.com: params[:id] is the incoming article_idthe dynamic finder tells you that too. And again, the favorites table does not have an id column...the unique key is user-article.  That's why I didn't put an id

Re: [Rails] Re: Calling destroy on a model that has no id column

2010-04-21 Thread soldier
# File rails-2.3.2/activerecord/lib/active_record/base.rb, line 2576 2576: def destroy 2577: unless new_record? 2578: connection.delete( 2579: DELETE FROM #{self.class.quoted_table_name} + 2580: WHERE

Re: [Rails] Parameters passing of select_tag

2010-04-21 Thread soldier
how about the rails api doc ? 2010/4/22 Prashant prashant.thak...@gmail.com: I wish to have an option in my application where user can select a value from Combo Box shown in a page and on clicking of button this is passed as parameters to another controller. There will be 4 combo boxes on

Re: [Rails] how to customize logger messages in rails 2.3.5

2010-03-22 Thread soldier
You can overload call method from Formatter. example: class Logger class Formatter Format = %s [%s] %s %sn def call(severity, time, progname, msg) Format % [severity, format_datetime(time), progname, msg] end end end $LOG.error('This is much shorter.') # ERROR