Displaying 20 results from an estimated 9000 matches similar to: "redirect_to(:action => ...) usage?"
2005 Dec 13
4
find()ing rows w/ NULL columns?
Agile Web Development with Rails doesn''t seem to have NULL in the
index [or my eyes have failed me again], and web searching turns up
lots of SQL statements containing NOT NULL.
I have a table of loans, and I want to record when something was
loaned and returned. The loan date can''t be null, or there''d be
no entry in the table. The return date must be something
2005 Nov 22
2
Error messages: relative paths seem weakly handled?
I create my rails app, with modifications to the default from a script.
Having had to upgrade rails once, and knowing that this is likely to
happen again because of the rapid updating of rails, it seems the
most sensible way to do it. As a result, I often do
/bin/rm -rf csestore
and then run my script from another window to repopulate it.
So naturally, to save having to cd into csestore, and
2005 Nov 22
3
Idiom for submit button?
What is the rails idiom for submit buttons on forms?
All other field types have helpers, but button_to creates its
own form, so should not be used. I''ve looked in "Agile Web Dev. with
Rails" but can''t see what I should do instead.
Is this "difficult" because it runs counter to AJAX type forms?
And, related, is there a way to ensure that hitting return in
2010 Sep 04
3
its easy but i forgot all
my models
borrower ----- has_many :loans
loan ----- belongs_to :borrower
my loans _controller
def new
@borrower = Borrower.find(params[:borrower_id])
logger.debug '' @borrower.id''
logger.debug @borrower.id
@loan = Loan.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @loan }
end
2005 Nov 23
15
:conditions => ... formatting
With code like:
if @params[:pnumber] =~ /\s*p?(\d+)\s*/
if student = Student.find_first(:conditions => ["pnumber like \":pnumber%\"",
{:pnumber => $1}])
@borrower = student
elsif emp = Employee.find_first(:condiwions => ["pnumber like \"?\"",
{:pnumber => $1}])
@borrower = emp
else
2006 Dec 30
1
redirect_to(:action => ''foo'') and return
I''m not sure why this is happening, but if I do this in a controller
unless @variation && @variation.quantity > 0
flash[:error] = "Sorry, that product is currently not available."
redirect_to(:action => ''error'') and return
end
rspec tells me
2)
ActionController::DoubleRenderError in ''The Carts controller with an
2006 Jun 07
0
passing a redirect_to action through a view to controller.
Hi,
I have a situation where I could link_to a shared action in my controller
through 2 separate use cases. In both cases, I''d like the action to execute
and then render the same exact page from where it was called. In other
words, just execute the action and then not do anything, maybe just refresh
the current page from where I called the shared action. If I do have to
specify an
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for
suppressing trailing newlines. Thus
erb -n script
gives errors. Where is Rails ERB so I can invoke it directly?
Thank you
Hugh
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
I''m resending this with additional information, as I''ve had no
response. I''ve been trying to use the fixture_references plugin,
and I seem to be getting lots of:
1) Error:
test_truth(DeviceTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ''description_id'' doesn
''t have a default value: INSERT INTO devices (`id`) VALUES (2)
2010 Mar 29
6
Updating records
So I would like to be able to update a record without having to load the
edit page. Lets use checking out a book as an example. From the front
page of my application I would like to be able to have a form field
where I can enter a record id and select one of a couple of check boxes
and then hit submit which will update the associated record with the
action selected by the check box (check out,
2017 Sep 29
0
Converting SAS Code
For the initial data step, assuming a data frame named stress already exists, and using base R, you can start with something like this:
barcodes.to.delete <- c('16187DD4015', '16187DD6002', {complete the comma-delimited vector of barcodes you don't want} )
yield <- subset(stress, !(barcode %in% barcodes.to.delete) )
yield <- subset(yield , !(field %in%
2017 Sep 29
0
Converting SAS Code
You might get better answers if you
1 - break this down into separate issues
2 - tell us what you want to achieve in words rather than SAS, we all
read English but few of us speak SAS
3 - post in plain text not HTML as HTML mangles your post
On 29/09/2017 13:47, Andrew Harmon wrote:
> Hello all,
>
> My statistical analysis training up until this point has been entirely done
> in
2017 Sep 29
5
Converting SAS Code
Hello all,
My statistical analysis training up until this point has been entirely done
in SAS. The code I frequently used was:
*Yield Champagin;
data yield;
set stress;
if field='YV' then delete;
if field='HB' then delete;
if barcode='16187DD4015' then delete;
if barcode='16187DD6002' then delete;
if barcode='16187DD2007' then delete;
if
2005 Aug 26
2
Generating barcodes (as gif/jpg)
Hello Rubyists,
I need to generate barcodes (in UPC and codabar symbologies) and
would like to know if anyone has done this with Ruby. From what I can
tell, it would be possible to use the gnu-barcode [1] or
barcodewriter [2] to generate a PostScript, then through RMagick (via
GhostScript) take the file and create a GIF/JPG.
These will really only be used for web display (to be printed
2012 Aug 07
3
Barcode Generating With Label On Canvas by using Barby gem
********UNDEFINED METHOD REGISTER ERROR IN THE FALLOWING CODE *******
Hi all,
I am trying to generate barcode(including its name as label at the
bottom of barcode image for easy understand with out scanning by barcode
scanner).
For this I am Using barby, chuncky_png, rmagick gems.
I am using the fallowing code to generate label at bottom of image by
using rmagick gem:
gem
2007 Oct 24
1
Stubbing Kernel.` (backquote)
I''m trying to stub(!) the Kernel.` (backquote) method and I''m having
confusing (to me) results. Here''s the method I''m spec''ing:
class Barcode
...
def raw_barcodes
self.make_temporary_copy
`OcrBarcode #{self.temp_file_path}`
end
...
end
And this is my (newbish) attempt at the spec:
describe "Calling @barcode.raw_barcodes" do
2017 Sep 29
2
Converting SAS Code
I wish to second this approach to learning R.
I tried for several years to translate other stat programs or provide
parallel analyses with R.
This dabbling-in-R approach did not work
.
When a transferred to a research unit that could ill afford commercial
software, I devoted my entire time to doing everything in R.
This was a difficult learning process, but I eventually became proficient
2017 Sep 29
0
Converting SAS Code
I will offer an opinion, with which others may fairly take issue.
If you are coming from SAS and wish to learn R, you should forget about SAS
entirely; it is ancient and convoluted. But more to the point, as others
have already suggested, you will only confuse and hamstring yourself trying
to convert the programming paradigms of one language into another. Better
to consider the **tasks** you wish
2017 Sep 29
4
Converting SAS Code
Regarding point 3, as a moderator I have been helping Andrew get this
post out to the list over the past week. His previous attempts were
encoded in some way that the listserv rejected. He sent me the post via
his gmail account and viewing the source I saw it had at least both
plain test and HTML an I said it was worth a try to post it. Certainly
on my mail client his post displays acceptably
2017 Sep 13
1
https://ctan.org/tex-archive/graphics/pstricks/contrib/pst-barcode/
On 13 September 2017 at 11:42, Johnny Hughes <johnny at centos.org> wrote:
> On 09/13/2017 10:28 AM, hw wrote:
>>
>> Hi,
>>
>> https://ctan.org/tex-archive/graphics/pstricks/contrib/pst-barcode/
>> says that pst-barcode is included in texlive.
>>
>> I installed texlive, and it can?t find pst-barcode.sty. Is that a
>> bug in the packaging