Displaying 20 results from an estimated 400 matches similar to: "Modelling Relationships as objects"
2007 Jul 19
7
NoMethodError in partial driving me mad
Hello,
i simplified have a news model, a news category model and a news
controller.
my _news.rhtml partial renders a single news entry.
in my controller there are the actions show and show_category.
if the "show" action is called, a single news item is rendered through
my partial with no errors.
if the "show_category" action is called, i get a NoMethodError while
displaying
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
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
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
5
Reports in Rails
Hi,
In my rails application I want to include a reporting mechanism that will
allow the users of application to view statistics of various operations
graphically.
Does rails provide inbuilt reporting capabilities? what are different
appraoches I can follow to achieve reporting in rails?
On googling I found following as some of the options,
1.Gruff Graphs for Ruby
2.SVG
3. using Apache FOP.
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
2010 May 01
0
Add custom root option to AR JSON Serializer
Hi,
In short: I can do following:
user.to_xml(:root => "xml_user" )
But not following:
user.to_json(:root => "json_user")
JSON serializer for AR doesn''t allow us to specify "root" option unlike XML
serializer. JSON serializer always uses model name as the root if class
attribute include_root_in_json is set to true.
I''ve added a patch which
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 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
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 Jun 29
1
session management not working for me in an exceptional condition
I have an RoR application(parent) which can be used to kickstart other RoR
applications(child).
A user can log in to parent RoR and then start child RoR''s and then visit
that RoR using one of the links provided in parent RoR; I have following
html code is parent RoR list page for visiting an child RoR
<input type=button onclick="visitApp1()"
2006 Aug 09
0
Sum/Aggregate at database level or in rails controller?
Hi,
Database model of my web app is as follows,
users(id,name)
Taskcategories(id,user_id,name)
Tasks(id,taskcategory_id,name)
TasksData(id,tasks_id,durationInHrs,date)
I want to collect and show following data from the above tables, in the
view,
1. Category wise duration total for a user for a week.
2. Category wise duration total for a user for each of the 7 days of the
week.
3. Total
2006 Jul 05
0
using show argument of Open4.popen4 win32:open3 module
Hi,
I am trying to start a rails webrick server programmatically. I want the
console for that server to be shown.
I earlier decided on using win32-open3 module as it provides me with
flexibility to keep track of running of processes.
I use following call to start webrick server,
input, out, err, pid = Open4.popen4("ruby homedir/script/server -p 3001",
2006 Jun 23
0
Rational Clearcase plugin for RadRails
Hi,
Where can i find a stable version of clearcase plugin for radrails?
Regards,
Jatinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060623/0ca95234/attachment.html
2006 Jun 23
0
onclick action for submit_to_remote
http://tr.openmonkey.com/articles/2006/01 says that I can''t use :onclick
options for submit_to_remote method in rails from a view.
How do I perform javascript validations for such controls supporting Ajax?
Regards,
Jatinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 29
0
Ajax Scaffold for a application started using win32-process module.
Hi,
I have an RoR application(parent) which is use to kick off other RoR
applications(ajax scaffold based).
I use win32-process Open4.popen4() to start the RoR applications.
Untill recently I was using normal scaffold feature of Rails, and recently I
migrated to Ajax Scaffold; After moving on to Ajax scaffold, when I try to
start a RoR from my parent RoR, the application do get started, when I
2008 Apr 23
0
Upload a file using Net:HTTP multipart post or ActiveResource
Hi Guys,
I am trying to upload a file to a rails server using a ruby script.
http://pastie.org/185380
I verified the parameters of the Net:HTTP post request and they seem
to be right. However the recipient, mongre,l shows following message
in console and the parameters sent, the file data, is all corrupted.
oh and one very weird thing happened. the console running mongrel
looks like following
2009 Sep 03
1
MeetMe unactive pin access
Hello,
I have conferences in my database.
I need at some moments, to access the database without asking pin access, or
with using cdr(accountcode).
Is it possible?
Thank you
Cordialement,
BERGANZ Fran?ois
P Pensez ? l'Environnement, n'imprimez ce mail que si n?cessaire.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Aug 10
1
Error while calling
Dear all,
I am getting the below errors when using asterisk. I am using sjphone for testing purpose.
Below are the setting for sip.conf and extension.conf
When i dial the number it rings on the remote telephone. but after ringing 1 time it will disconnect.
Can anybody tell me what does this error means and the how to solve this issue.
Thanking You,
Joel
sip.conf
[general]
context=default