Displaying 20 results from an estimated 1000 matches similar to: "Reports in Rails"
2006 Jul 20
5
How can I make has_many prevent a delete that would lead to orphans?
e.g.
class Asset < ActiveRecord::Base
validates_presence_of :asset_number, :make, :model, :location,
:name, :serial_number
validates_numericality_of :asset_number
validates_uniqueness_of :asset_number
belongs_to :user
belongs_to :location
belongs_to :asset_type, :foreign_key => ''type_id''
end
class Location < ActiveRecord::Base
validates_presence_of :name
2006 Jul 25
4
Sorting by two fields
I have a list of TimeSheet objects from an ealier AR query, which I
can sort by the full name of the user like so:
@time_sheet_entries.sort! { |a,b| a.user.full_name <=> b.user.full_name }
I can sort by the started time like so:
@time_sheet_entries.sort! { |a,b| a.start_time <=> b.start_time }
My question is how do I do a sort so that the list is sorted primarily
by user.full_name
2006 Apr 25
8
Does Rails suppports XHTML for views for inline SVG''s?
I have following piece of code(which when saved in a file with .xhtml
extension and opened in Mozilla 1.5.0.2 works fine);
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>SVG within XHTML Demo</title>
</head>
<body>
<p> You can embed SVG into XHTML, provided that your
2006 Jul 21
3
How can I create OrderItems that go in a Order?
I suspect my problem is similar to having an order and wanting to have
order items as part of the order, so I''ll explain the problem in those
more familiar terms and then explain what if anything makes my actual
situation different at the end.
In an Order lets say you have: shipping_address and a shipped bool.
OrderItem has quantity and name
So Order has_many :OrderItems, and OrderItem
2006 Nov 04
6
Javascript form validation for In place editting in scriptaculous ?
Is there a way by which I can do form validation for form generated by In
Place Editting of scritaculous?
The reason is, I want to avoid server roundtrip for checks which I can
perform at browser.
Regards,
Jatinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060828/ca882668/attachment-0001.html
2008 Mar 24
2
render not able to locate template in publisher
Hi guys,
I have a publisher called UserPublisher setup in models directory of
my app. The reason I have it in a model is because its then possible
for me to invoke publisher methods in after_callbacks of my other
models, just the way we do it for ActionMailer.
My problem is that when I try to update a users profile specifying
location of the view template as a paramater to "profile"
2006 Jul 18
2
Write a new generator
Hi,
Could anyone point me to how to write a generator in Ruby?
I was going through code in ruby files at
\rails-1.1.2\lib\rails_generatorand found that it reads gems
specification to look for generator s present
on the system.
The way there are tutorials on how to create plugins for Rails, are there
any for Generators?
At the end of it I should be able to do something like this
ruby
2008 Mar 25
7
Facebooker::Session::SessionExpired (Session key invalid or no longer valid)
Hi All,
I''m having horrible problems with this exception, which seems to happen as
soon as I access the session object. Does anyone know what the path is to
recover from this? This post looked to be the most promising:
http://rubyforge.org/pipermail/facebooker-talk/2007-December/000047.html
And I followed all of the steps except switching my session store, and
modifying the default
2006 Jun 05
1
starting a non blocking child process
>From a ruby program I would like to start another process which should
continue to run even after the parent process dies.
Is there any way I could achive this?
>From the child process I want to start an instance of SCGI server which
should continue to run even if the parent process dies.
Thanks in Advance,
Jatinder
-------------- next part --------------
An HTML attachment was
2006 May 24
4
AR foreign key problem.
Hello Railslist,
(I''m using RadRails 0.6.3 on Windows XP with Ruby 1.8.4, Rails 1.1 and SQLite3)
I have two tables in the database: "locations" and "customers":
customers.sql
---
id INT PRIMARY KEY
name VARCHAR 255
address VARCHAR 255
postal_code VARCHAR 255
city VARCHAR 255
---
locations.sql
---
id INT PRIMARY KEY
postal_code TEXT
longitude FLOAT
latitude FLOAT
2006 Jan 18
5
Ruby and charting
Hi-
I need to create simple charts on the fly - I had used JFreeChart in the
past with inJ2EE apps. Is there any equivalent here for Ruby. My
charting needs are simple: just line charts.
Also if anyone has done this, pls let me know how I should go about in
doing it.
Thanks
--
Posted via http://www.ruby-forum.com/.
2005 Oct 06
3
Xen unstable/SuSE 9.3 install issue
Hi,
I have successfully installed Xen unstable binary on SuSE 9.3. I am trying
to do a source install and I got the following error. Will be glad for any
help or guidance.
In file included from include/asm-xen/asm/processor.h:18,
from include/asm/thread_info.h:17,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from
2006 May 03
6
ruby on rails international & BIRT integration?
Hello,
I see, that Rails is quite english-centric. I am developing some webs,
that are not primarily in English. I have a few questions:
- besides turning of plurals, what should I take care? How to use utf-8
for all data and converting it from local charsets to utf-8?
- how do I make my page multilingual (i.e. adding english support
later)? Is there something like gettext support? Is
2006 Mar 26
3
Charts and Java servers
Hi,
As a long time Java/J2EE exponent I wanted to give Rails a fair crack of the
whip and after we evaluated it for several weeks I have to say I like it.
The installation process for the base system/framework is straightforward on
the two platforms we''ve tried (Windows and Mac OS X). However, the charting
components available, relying on ImageMagick or GraphicsMagick seem less
clear
2008 Jan 14
15
How to get a Window handle from another app?
Hello,
I would like to get a window handle from another app outside of wxRuby
and convert it into a wxRuby Window handle so that I can use it as the
parent Window for several wxRuby child windows. Basically I want to use
the FRAME_FLOAT_ON_PARENT window style so that my wxRuby windows become
associated with the outside app kind of like toolbars, e.g., they don''t
show up in the
2006 Jul 21
4
Printed/PDF Reports (Text/Tabular/Summary) in Rails
The recent discussion about different graphing solutions made me
think. What is everyone using for general reports? Currently I have a
web based application at work that has roughly 20 different reports
ranging from simple tabular data with totaling at the bottom to
pretty, colorized, graphic logo''s,etc... going to clients, and
finally complex ones I hate to think about such as
2006 Jun 16
2
RJS replaces JavaScript?
Hi All,
I am currently devleoping a Rails application and I need to do following as
part of client side operations,
1. HTML Form validations
2. AJAX
I am currently calling Javascript methods from views of my application; I
heard about RJS(Remote Javascripts) templates; are the replacing Javascript
altogether? can I use RJS for HTML Form validations and AJAX?
What I believe is that with RJS
2007 Nov 23
3
How to generate c1 and c2 reports for Rcov
Hi all,
I am implementing the Rcov stuff in my application and i was
able to generate c0 Report but i am in confusion about how to generate
c1 and c2 reports. Could some one please guide me for the same. Thanks a
lot in advance
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2007 Apr 09
6
gruff send_data
Hi,
for those with experience of Gruff module: suppose I want to send
image from server straight to the browser (as example on gruff web
site):
send_data(g.to_blob,
:disposition => ''inline'',
:type => ''image/png'',
:filename => "gruff.png")
the server seems sending this binary data ok, but I am having
2006 Feb 10
1
Plotting library
Hi,
I''m fairly new to Rails and am moving from PHP. I am looking for a way to generate generate image plots on a Webpage. I have looked at SVG::Graph, but it doesn''t look nearly as flexible or functional as jpGraph, which I use in PHP (http://www.aditus.nu/jpgraph/).
I also generate some more complex graphs using matplotlib via Python