Displaying 20 results from an estimated 100 matches similar to: "New to ruby, Need help"
2013 Apr 19
1
How to read a direct access file by connecting fortran with R ?
Hello all,
I would like to read the specific line number row of a direct access file (which is stored as a n_row*n_col matrix of elements kind=p) without reading all the preceding lines (i.e 1,2,..,row-1).
Is there a function in R that can perform this task?
To solve my issue, I tried without to call Fortran from R by doing the following steps:
I) I wrote a subroutine in fortran called
2008 Oct 28
7
aasm callback order?
Hello!
Sometime ago I ran across a webpage where someone had identified the
full callback sequence for an object lifecycle including AASM with
it''s :enter and :exit and whatnot callbacks. Unfortunately, I can''t
find it and searches don''t seem to help.
Does anyone have a reference to a page that shows the callback
sequence with Acts As State Machine (the gem)?
I think
2008 Apr 16
3
Linking to "Next Entry >>" from the current Entry Page
Hi all,
I''m trying to link to the "Next Entry >>" from the current entry page
(in show.html.erb).
Any one know how I would do it?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send
2009 Mar 06
5
ActionMailer Layout on HTML version not Plain Text
I''m sending plain text and html emails by having multiple files for each
email I send. For example, for my registration email I have a
registration.text.plain.erb file and a registration.text.html.erb file.
I want to use a layout for the html version of my emails. In my mailer
I put:
class AccountsMailer < ActionMailer::Base
layout ''email''
...
end
2009 Mar 26
1
Turning off the layout in ActionMailer?
So I''m happy to see that ActionMailer supports layouts now (it may
have for a while, but I just now realized it).
But I don''t see a way to turn them off selectively or by multipart
type.
For example, if I have a layout that''s really simple in "layouts/
email.html.erb":
<div style="border:1px solid gray">
<%= yield %>
</div>
I
ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
2008 May 15
13
ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
Acts_as_soft_deletable is a rails plugin that provides the ability to
soft delete or disable models.
When models are destroyed, they will be archived so that they can
later be restored easily. Its similar to acts_as_paranoid but uses a
different approach that should make it a little more foolproof.
See the README at the following url for a better description.
github url:
2009 Mar 27
3
ANNOUNCE: Hirb - A gem enhancing your script/console
Hi,
I''m announcing Hirb, a mini view framework which enables script/
console to provide custom views.
Out of the box your activerecord objects come back as ascii tables.
You can also configure your tree-based models to return as ascii
trees:
Numeric
|-- Float
|-- Integer
| |-- Bignum
| `-- Fixnum
|-- Date::Infinity
`-- Rational
I''ve written two tutorials on
2008 Apr 03
3
Overloading and wrapping an association method
Hi all:
For example I have:
class Color < ActiveRecord::Base
belongs_to :ball
end
class Ball < ActiveRecord::Base
has_many :colors
end
What I want to do is to write a method that:
1. takes the result of Ball#colors, which is an array of Color objects
2. do something with the array
3. return the result
but I want to name my method Ball#colors, i.e. I want to overload the
generated
2008 Apr 11
2
Validating an ActiveRecord object and its has_many :through associations
Considering an object with several has_many :through => associations,
what is the ''best'' way to handle validations?
As an example:
class Student < ActiveRecord::Base
# some attrbutes like
# :name
# :grade
# relationships
has_many :students_assignment, :dependent => :destroy
has_many :assignments, :through => :students_assignment
has_many
2008 Apr 04
6
validates_numericality_of :not_equal_to
I have a situation in which I want to validate a number is not zero.
Both positive and negative values are acceptable, just not zero.
validates_numericality_of has an :equal_to attribute, but I don''t see a
:not_equal_to. I have not yet been able to find anyone who has
discussed this. I did find information about custom validators, so I am
now using a custom validator to check the field
2009 Mar 20
1
Getting a Time Zone abbreviation from the full name?
There''s got to be an easier way...
I am building an event manager and as part of it, the user selects the
time zone of the event from a drop-down list using the
time_zone_select helper. This is stored in the events table as a
string.
Because of legacy data which is stored in UTC, I want to keep the
dates and times in the table as UTC but when I display it, I want to
show the abbreviated
2003 Dec 18
1
SIP Inuse Count Wrong
I am currently using a copy of Asterisk checked out as the code of 10 days
ago from Asterisk and the:
sip show inuse
reports that I have 3 incoming connections to one of the Grandstream
phones, even though that isn't the case.
I believe I have tracked the problem down to the following error message,
which also (conveniently) showed up 3 times:
-- Got SIP response 481 ""
2008 Sep 18
8
handling association changes? What's the best practice?
Hello all!
I have a conundrum that I''m _sure_ someone else has already thought of
and solved. How does one best handle the scenario of association
object changes and data integrity?
For example, if I have a standard ecommerce site that sells Products
and people can have Orders and an Order has_many Products... then,
what happens if Product #3 is part of Order #2 but at some point, the
2008 Apr 14
9
scientific notation problem
We''re developing a system that''s used for tracking company IPO data
and we''re running into a few number storage issues. For large numbers,
i.e. numbers greater than 100 million, MySQL insists on storing these
as scientific notation. I don''t really have a problem with that but
when we want to edit these fields using something like:
<% form_for(@company) do
2003 Sep 28
0
Flash and Call Transfer
I am new to asterisk and have been playing with it for just a few days.
The GrandStream BudgeTone-102 equipment I have allows me to do a blind
transfer, but I am interested to know how to do something which isn't
blind.
I have managed to enable the call parking which allows me to send a call
to extension 700 for somebody to collect, but it still seems rather
awkward.
I also have
2003 Oct 26
1
NuFone International Calls
Does anybody know how to do an international call using NuFone. I realise
this isn't really the place to ask, but NuFone appears to be closed for
the weekend and would like to have a try at this before tomorrow. I
assumed it would be '011' for an international line followed by country
code but that doesn't seem to work.
I am getting:
-- Executing
2003 Dec 12
0
Translation time
When you look at 'show translation' you see:
Translation times between formats (in milliseconds)
but is this the number of milliseconds required to convert 1 packet of
data, or the amount of time required to translate 1 second of data? I am
assuming it is the time for 1 second.
Thanks,
Michael
--
Michael T Farnworth
Maxima Systems Ltd (http://www.maximasystems.com)
16 Woodbourne Sq
2003 Dec 18
0
CAPI Calls Don't Bridge
I had a working configuration whereby an incoming call on an ISDN line
would be sent out on the second ISDN line, but since I updated to the
latest version of Asterisk I get this error message:
WARNING[311315]: File res_parking.c, Line 226 (ast_bridge_call): Bridge
failed on channels CAPI[contr1/s]/0 and CAPI[contr1/01624619052]/1
The message comes up as soon as the outgoing call is answered
2004 May 07
0
Manager, command action
Is there a way to enable additional CLI commands in the manager, like
add and remove extension? Even if you just point me to a place in source
code, that's ok.
Dmitri Pavlenkov
Technical Support
Im1 Web Hosting
2008 Apr 09
2
sitemap for RoR
Hi all
is there a plugin available by which i can generate a sitemap for my
site automatically.. I mean when ever a page is added it will get listed
in the sitemap?
If you have implemented it do let me know
thanks
dhaval parikh
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google