similar to: create an object from a string?

Displaying 20 results from an estimated 1000 matches similar to: "create an object from a string?"

2006 Jan 14
11
nuby: do models have to inherit directly from ActiveRecord?
Hello, I have a few models -- book, cd, dvd -- for which I''d like to have an abstract base superclass to hold some common stuff. That abstract class, I was thinking, would inherit from ActiveRecord. Didn''t work, though, and looking around, I found this: <http://wiki.rubyonrails.com/rails/pages/HowtoMakeAbstractModel>
2006 Jan 16
15
where''d we come from?
I''m curious -- how many of us came to Rails from other branches of the OO world -- Java, C# -- and how many of us came from the design or non-OO scripting worlds? Reason I ask is that I''m finding Rails a blast and very productive, but I think one reason is that I already cut my teeth on MVC and ORM during two years of writing apps with J2EE/Struts/Hibernate. And in Javaland, it
2006 Jun 17
2
preventing indexing of an acts_as_ferret''d model?
Hi, this is hopefully an easy one, but I''ve gone through the api and searched past forum entries, and am drawing a blank. I have a model that with acts_as_ferret mixed in to it, which is working fine. But I want users to be able to set a ''private'' attribute on the model, and when it''s set to true, create and update methods would skip indexing. So, how can I
2006 May 05
4
Is sanitize() strong enough to protect me from XSS?
Haven''t been able to find a good enough answer on whether using sanitize() is enough to really protect me from XSS attacks I basically have a blog page that I want to allow people to display comments on but would like to allow html tags to be posted on the comments, these could html tags like the imageshack img tags, youtube player, photobucket img tags etc any other approaches or
2006 Jan 17
5
Noob Question concerning code in Agile Web Development with Rails
Hi, I''m currently learning Ruby on Rails using "Agile Web Development with Rails." I am using RadRails as my development environment. Everything has been going along well, until the end of chapter 7. Just before the end of the chapter, we set up our store pages so that they can be styled with the depot.css stylesheet. This is where I run into my problem. The stylesheet
2006 Apr 05
5
duplicate search results
i''m using Ferret 0.9.0 with acts_as_ferret (the one from svn.jkraemer.net), and i''m getting duplicate results, as described in this thread: http://rubyforge.org/pipermail/ferret-talk/2005-December/000048.html is there a way to configure the indexes created by acts_as_ferret to use :key => :id, as described in that thread? i''ve poked around in the code, and had
2006 Mar 18
2
redirect killing dispatch.cgi
hi, having a maddening problem with a redirects between controllers. app is working fine on my two local machines, a mac and a pc, with either webrick and lighttpd/cgi on either machines. i move it to my hosting provider and try to get it working with apache + cgi, most of it works, but it fails at a specific spot, and causes dispatch.cgi to hang indefinitely. nothing shows up at all in the
2006 Jan 22
2
a newbie doomed in the first introduction to ruby.
Hello, I have bought the Dave Thomas Agile Developtment with Rails. (I have previously bought and read his Programming with Ruby book) On my winxp sp2 system ruby 1.8.15 (one click installer), rails 1.0framework (with ruby gems) and mysql 5.0 are installed. While following the example stated in the Chapter Building an Application I had following problem. After creating databases for test,
2006 Apr 19
2
Credit Card Processing / Merchant Account
Hi All, Has anyone implemented a credit card processing / merchant account system using Rails? I know that there is a ''payment'' gem that is supposed to integrate with the Authorize.net gateway, but I''m wondering if that is the best (and only) solution out there. Are there any other recommended solutions from Rails programmers out there? Thanks in advance for the
2006 Jan 26
2
javascript in link_to?
having trouble finding how to include a random chunk of javascript (an onclick event handler) in a link_to generated link. at first i thought i could use the html_options field, but if i understand correctly, that only supports :confirm, :popup, and :post options. hope i''m wrong. anyone know different? john _______________________________________________ John McGrath
2006 Apr 24
1
Just a couple questions on how I should go about
> I need a simple blog with categories and comments and an archive. I want a > nice posting system, but don''t want it in HTML. Is there something I can add > or make, kind of like BBCODE? http://whytheluckystiff.net/ruby/redcloth/ http://wiki.rubyonrails.org/rails/pages/RedCloth > I pretty much know what else I have to do, but there is one more thing. A > client section.
2006 May 29
14
Jabber Powered Rails Chatroom
For those who cant access IRC, or just looking for a quick browser based alternative, i started an open jabber powered webchat for rails. Hopefully this will be a nice alternative for people to go to ask questions, get some help, offer some help, etc. I hope the community enjoys it, just trying to give a little back for all the hard work. It can be accessed here http://jabber.dufftech.com
2008 Feb 05
2
help with oop in R - class structure and syntex
Hi, I read section 5, oop, of the R lang doc, and I am still not sure I understand how to build a class in R for oop. I thought that since I understand the oop syntex of Java and VB, I am wondering if the R programmig experts could help me out by comparing and contrasting the oop syntex in R with that of Java. For example, the basic class structure in Java is like this: public class Bicycle {
2007 Jan 26
6
has_many :through query question
I think this is obvious. but for some reason I''m not getting it. Models: Bicycles, Accessories Join Model: Upgrades The idea is that you can upgrade your bike by adding an accessory, and the upgrade price is often less than the accessory price would normally be. So the Upgrades table has id, bicycle_id, accessory_id, and price. class Bicycle has_many :upgrades has_many
2012 Apr 12
1
Console to RHEL6.1 container
We are trying to create RHEL6.1 container and having trouble getting a proper console to the container. I have used lxc containers in the past and lxc has a script (lxc-fedora) to setup a basic Fedora container. Is there something similar or docs with virtmgr ? We started out making a copy of the root fs and using that copy as the root for the container. I made a couple of tweaks to the
2006 Apr 22
2
ruby/amazon isssue
hi all. we''re using the ruby/amazon library (http://www.caliban.org/ruby/ruby-amazon.shtml), which totally rocks. but i''m noticing that when nobody has used our site in a while (it''s under development, so basically nobody uses it at night), the ruby/amazon calls sometimes fail. seems like something times out, perhaps. anybody have similar issues, or know what might be
2007 Jan 16
1
calling java API from ruby
ok, i want to be able to send some data from my rails app to a CRM. The library that defines the API for talking to the CRM is written in java. I got JRuby working, which is pretty cool, but to my understanding i would have to convert my ruby on rails app to a jruby on rails app which, as far as i''ve understood, is different deal altogether and would be set up more like a java server
2017 Nov 09
4
weighted average grouped by variables
hi all I have this dataframe (created as a reproducible example) mydf<-structure(list(date_time = structure(c(1508238000, 1508238000, 1508238000, 1508238000, 1508238000, 1508238000, 1508238000), class = c("POSIXct", "POSIXt"), tzone = ""), direction = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L), .Label = c("A", "B"), class =
2006 Jan 22
2
a newbie doomed in the first introduction to rails.
Hello, Thank you for the fast responses, I really appreciate. I really enjoy being a part of such a great community. I still could not solve my problem. To make sure that I can not connect beacuse of access rights, I have started mysql server --skip-grant-tables option. (I have read the part of the manual about access rights, which I was to read in this list, but 4 AM in the morning, I had hard
2008 Nov 26
1
How to create a string containing '\/' to be used with SED?
Hi guys, I've been struggling to find a solution to the following issue: I need to change strings in .ini files that are given in input to a program whose output is processed by R. The strings to be changed looks like: "instance = /home/TSPFiles/TSPLIB/berlin52.tsp" I normally use Sed for this kind of things. So, inside R I'd like to write something like: command <-