similar to: How to use at_beginning_of_year

Displaying 20 results from an estimated 100 matches similar to: "How to use at_beginning_of_year"

2006 Apr 25
3
Profiling views
Hi folks ! I''ve been using Rails for about 2 months now, but I''ve some performance problems. So I was wondering if there''s a way to profile views ? Thanks ! -- ,= ,-_-. =. Lo?c Guitaut ((_/)o o(\_)) http://www.belfalas.org `-''(. .)`-'' Jabber ID : Flink@im.apinc.org \_/ GnuPG KeyID : 0xA78CD85D -------------- next part
2010 May 26
3
Safebuffer with rails 2.3.8
Hi there! I''ve just migrated from rails 2.3.5 to 2.3.8 and now I have a lot (and I mean a lot!) of deprecation warnings like this one: "DEPRECATION WARNING: ActionView::SafeBuffer is deprecated! Use ActiveSupport::SafeBuffer instead." But I don''t understand how to remove this. I searched through installed plugins, and there is no reference to SafeBuffer :( Any
2006 Apr 07
3
Howto set a global parameter
Hi, In my login_controller I get the usename of the person logging in. @username = @user.name puts " DEBUG: #{@username} just logged in\n" # This works But @username seems empty when accessed from numbers_controller.rb , how to I set it to be accessible global? Or at least move the content of that variable over to another controller. Best regards, Martin
2006 Mar 20
5
:conditions => ["phone like ''%:phone%''" , {:phone => "555"}]
Hi all, What''s wrong with the way I specify the condition in : Person.find :all, :conditions => ["phone like ''%:phone%''" , {:phone => "555"}] ? It translates to (note the two '' between the two ") SELECT * FROM people WHERE (phone like "%''555''%" ) instead of SELECT * FROM people WHERE
2006 May 18
7
Server out to excel
How would one server out to excel a html table with the mime/content type application/vnd.ms-excel ? In PHP it would be something like ?php header("Content-Type: application/vnd.ms-excel"); ------ But how do I do this in rails? Cheers Glenn -- Posted via http://www.ruby-forum.com/.
2006 Jun 12
4
Some help with fun SQL stuff...
I have one table that stores data related to math problems, and another table that stores users'' answers to those problems. To make this very simple, we''ll say that the math table has two numbers that get subtracted, and the answers table has a field that can either be "pos" or "neg" math _____ 2 5 8 3 Okay so if we do the math, we know that the
2006 Jun 13
13
Pass infomation between different views and controllers
Hi, I am a rails and ruby nuby :-) How do you pass data between different controllers and views? I have a page ( a quote) that I am editing url ....quote/edit/6 6 id the current id. I then go to a catalog (url....catalog) to add an item to my quote (I do this via a line_item file that the quote reads) I now want to go back to the quote. I have tried this <%= link_to ''Back to
2007 Apr 19
1
Mime Type in Nautilus
Hi All... Could someone guide me to solve a strange behaviour of Nautilus, when I want to click on a JPEG file that has a .jpg extension I receive this message and eod refuses to launch: >=-=-=-=-=-=-=-=-=-=-=-=-=-=-8<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Cannot open Cactus -'Ot 'N' Sweaty(1972)_back.jpg The filename "Cactus -'Ot 'N'
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
2006 May 26
2
validates_uniqueness_of but only when exists
I want to validate the uniqueness of a field if the field has a value. Is there anyway to do it? -- Posted via http://www.ruby-forum.com/.
2008 Jul 01
1
Installing R into home directory?
I've been trying to install R into a user's home directory for them by compiling from source code, on a machine for which neither of us has administrative access. I've run configure using the --prefix option to specify their home directory. This seems to work OK up to a point, but when running make, it seems to expect to be able to install IDL into /usr/local/, and if you are unable
2006 May 25
16
yet another rails site - happycarpools.com
I''m pretty much done with a project I''ve been developing to learn Rails, http://www.happycarpools.com . If you could take a look, that''d be awesome! Feedback would be even more awesome! Probably the coolest thing about making this has been seeing how Rails does *so much* and hardly has any superfluous parts, if any. There are so many features that I initially
2007 May 12
2
HA with CentOS
Hi All, I have two identical computers with CentOS 5.0 and lampp installed. Are there any high-availability solution for CentOS? So, when one one computer offline, another could act as a backup and being transparent to user. Regards, Tong -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Apr 25
1
Printing
I have installed CentOS5 on a Dell Laptop, I works properly, except I can't install the printers. I don't have the System > Administration > Printers What am I missing? -- Thanks http://www.911networks.com When the network has to work
2007 Apr 30
2
mirrorlist(for nagios or snort)
hi, i want to know how i can find a mirror for installing nagios in centos 4. Because when i do yum search nagios or yum install nagios i don't receive a response.I don't know if somebody can give me a website like apt-get.org(unofficial apt repositories). thanks
2006 Jun 16
2
image_select_tag with name and value
What have I missed I have a .rhtml with the sandard form parameters <%= image_submit_tag("excel.gif", :alt => "Download List to Excel", :border => 0, :name => ''render_action'', :value => ''excel'' ) %> Which genenerates I believe a valid html fragment for a submit button. <input alt="Download List to Excel"
2006 May 19
2
How to run direct DML (insert or update)
I want when the user clicks on a button on the browser "Perform monthly billing run" the controller to lanch a sql DML statment to be called (in the model?) than runs something like "insert into billing (item, qnt, total_cost, billing_run_timestamp select item, qnt, item*cost as total_cost, timestamp from services where service_end_date is null" How can I run a DML
2007 May 15
5
Make Raid1 2nd disk bootable?
On earlier versions of Centos, I could boot the install CD in rescue mode, let it find and mount the installed system on the HD even when it was just one disk of RAID1 partitions (type=FD). When booting from the centos5 disk the attempt find the system gives a box that says 'You don't have any Linux partitions'. At the bottom of the screen there is something that says:
2006 Mar 29
38
Poll: Which distro do you use for Rails/Ruby development?
Good afternoon, I''ve two quick questions for the Ruby/Rails community. 1) Do you use Linux for Ruby or Rails development? 2) If you use Linux, which distro do you normally use to develop? Thank you for your input. :-) -- Posted via http://www.ruby-forum.com/.
2006 Jun 07
16
How dows RoR work?
This is so frustrating. Is RoR that easy to learn or is it hype or is it just me? I wonder how many newbies like me are surfing the docs trying to get a clue of the basics. Every tutorial I find is much the same, and seems to skip the fundmental parts. How should you understand the Ruby API http://api.rubyonrails.org/? What is < ActionController::Base? Can''t I set a cookie under