[Rails] [ JOBS ] Ruby on Rails - Remote

2012-09-20 Thread Matt M
! Successful candidates will be able to demonstrate their willingness to try new technologies and the ability to prototype ideas quickly. There is the option to work remote. Please reach out to Matt at mmarci...@entech.com if interested... Thanks, Matt -- You received this message because you are

[Rails] Re: multiple modules defining same method included into a class

2012-09-18 Thread Matt Jones
# calling 'super' here hits the generated accessor from has_many end end There's one additional wrinkle for many of the modules in Rails itself - many of them are extended with ActiveSupport::Concern, which tidies a bunch of things up and (most relevant here) changes the seman

[Rails] Re: How to convert the HTML entities into UTF-8 character set, in ruby 1.8.7

2012-09-11 Thread Matt Jones
uot;. Or at least converting the html entity to the character "ö" ) > > Thank you > CGI.unescapeHTML may do what you're looking for. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to

Re: [Rails] Object Efficiency

2012-09-11 Thread Matt Jones
problems yet) > Running less code in general is good for performance, but there's enough churn (from the rest of the stack) of objects being created and discarded that unless your code is doing A LOT of creation it's not likely to be relevant. --Matt Jones -- You received thi

[Rails] Re: not seeing where name attribute is added to input fields

2012-09-09 Thread Matt Jones
ns["type"] ||= field_type > options["value"] = options.fetch("value") > { value_before_type_cast(object) } unless field_type == "file" > options["value"] &&= ERB::Util.html_escape(options["value"])

[Rails] Re: The bundled mysql.rb driver has been removed from Rails 2.2.

2012-09-07 Thread Matt Jones
t this error while creating the db.do respond if someone knows about > it. > > Have you tried installing the mysql gem (as specified *in* the error message)? --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quo

[Rails] Re: transfer text file to lpt1 port

2012-09-05 Thread Matt Jones
://groups.google.com/d/topic/rubyonrails-talk/fUMJxKOIaE8/discussion Not sure if the final method there (using jzebra) will work for your app, but it seems like a good start. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal

[Rails] Re: hii friends,,,,,i m new to rails......i think there is a problem in destroy command .

2012-09-02 Thread Matt Jones
exception or error ?? > > No - the generator output is (slightly) confusing, but raising an exception in these cases would mean that you wouldn't be able to use 'destroy' to clean up after a generator if you'd manually removed any of the files it had created.

[Rails] Re: [Whenever gem]What is the reason that linux's cron can't automatic running?

2012-09-02 Thread Matt Jones
an explicit path to any executable needed - so /some/path/to/backup instead of just backup. Digging around in the code for 'backup' also shows that you may want to pass --root-path=/wherever/your/app/lives to the script as well, to ensure that it can find the config files, etc that it needs.

[Rails] Re: Paperclip images are not stored in my directory

2012-08-19 Thread Matt Jones
assets' for this directory - the asset pipeline uses that URL, so you're likely to get strange behavior (especially in development mode) if you use it as well. Other than that, you'll need to provide more detail about what happens, any error messages, etc. The uploaded files clearly go *s

Re: [Rails] Speed Up rake?

2012-08-01 Thread Matt Jones
s the "band-aid". Tools like Spork address a single issue - "environment reloading is expensive" - with a simple solution, not reloading when it isn't needed. That's *far* more useful, especially if you're a developer on an *existing* app and don't have the

[Rails] Re: Rails associations

2012-08-01 Thread Matt Jones
example, it seems clearer to say "one vehicle belongs to a single vehicle category". --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegrou

Re: [Rails] f.send in form?

2012-07-31 Thread Matt Jones
d the correct code in your original post, but this isn't that code. Line 50 here is saying, "call the data_type method on the question object with these three parameters". The generated accessor doesn't understand the parameters, and you get the error. If you want to call a metho

Re: [Rails] Re: Rails' inflections are messy

2012-07-29 Thread Matt Jones
and 'index' actions? (currently plural-with-no-args vs. singular-with-one-arg) I suspect you're going to face a lot of pushback from all the developers who *have* managed to "keep it straight", since your suggestion involves breaking every one of their applicatio

[Rails] Re: ::Rails.env based domain var

2012-07-27 Thread Matt Jones
best would be to set it as the default host: config.routes.default_url_options[:host] = 'something.com' in each environment. This has the added bonus of ensuring that full URLs always get generated with the right host. You *may* need to also set config.action_mailer.default_url_o

[Rails] Re: Multiple associations to the same model

2012-07-22 Thread Matt Harrison
Got it working perfectly now. I'm not going to put much checking in, if I leave a couple of small gaps and something gets mis-associated, I can push harder for an overhaul of the dataset :) Thanks again -- Posted via http://www.ruby-forum.com/. -- You received this message because you are su

[Rails] Re: Multiple associations to the same model

2012-07-22 Thread Matt Harrison
Thanks guys, I will have a fiddle and see what I can do with your suggestions. It's really a rediculous way to keep the data and if it was up to me I can guarantee it would be done differently :) Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are su

[Rails] Multiple associations to the same model

2012-07-22 Thread Matt Harrison
I have a model which contains a large dataset which is unmodifiable. I contains a relation of ids to names for several item types lumped together, not idea I know. I have a model which needs two associations, both of which will link to this model above, but with different names. For example, lets

[Rails] Re: Failed. Response code = 404 error. ActiveResource, RoR, REST

2012-07-17 Thread Matt Jones
n a json file on screen. > You're getting a 404 because ActiveResource doesn't know how to formulate a URL for your service - it's going to be trying: http://localhost:50173/rest_service_impls/1 which obviously won't work. You'll either need to figure out how to re

[Rails] Re: problem with apache + passenger

2012-07-17 Thread Matt Jones
cpro5331.publiccloud.com.br/redmine > > The "/redmine" bit here may be confusing the issue. It's definitely not correct, but Apache may ignore the error. > >Options FollowSymLinks >AllowOverride None > &g

[Rails] Re: How can I connect to existing database

2012-07-17 Thread Matt Jones
the ones you've got should be FIRED. Running SQLite in production is bad enough, but expecting it to handle access from multiple applications? Surely there's a real DB someplace in the shop... --Matt Jones -- You received this message because you are subscribed to the Google Group

[Rails] Re: Cure AIDS Now web dev

2012-07-13 Thread Matt Jones
://www.afpnet.org/Ethics/EthicsArticleDetail.cfm?itemnumber=734 - TL;DR - this entire scheme smells like pure bullshit. CAN's site appears to be flirting with the federal banhammer for bogusly claiming 501c3 status, and AMG's site appears remarkably free of the sizabl

[Rails] Re: devise 2.1.0: return Completed 401 Unauthorized when post json datas

2012-07-13 Thread Matt Jones
be that you're either trying to authenticate for a post request, failing authenticity token checks, *or* not matching a route somehow. But those are just wild guesses without more specifics about what you're attempting to do. --Matt Jones -- You received this message because you are subs

[Rails] Re: has_many association with autosave issues

2012-07-10 Thread Matt Jones
s to be > the case since the beginning of time... > > Anyone know why? > Sometimes it's useful - if you want the save to fail if any child has errors, use validates_associated: http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_associ

[Rails] Re: Problem processing text file after uploading

2012-07-08 Thread Matt Jones
.com/thoughtbot/paperclip/commits/master/ doesn't exactly look like "no activity" to me... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://group

[Rails] Re: activerecord issues with rails 3 postgresql

2012-06-28 Thread Matt Jones
ns call. You'll also run into Postgres's rules about using ungrouped values in the SELECT part; the above query won't be legal even with a correct join. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Re: why use rescue nil?

2012-06-20 Thread Matt Jones
ame thing (returning nil if no record was found). --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/8gD2kFdxxOcJ. To

[Rails] Re: Extracting SQL statements from the rails development log

2012-06-20 Thread Matt Jones
king to grab all the queries, check out the Notification system: http://asciicasts.com/episodes/249-notifications-in-rails-3 the 'sql.active_record' notification will be fired every time there's a query. --Matt Jones -- You received this message because you are subscribed to

[Rails] Re: Is activeresource broken in rails 3.2.4?

2012-06-20 Thread Matt Jones
ls 3.2.4 > > Better question: is the service on the other end paying any attention to the parameters? Not going to have much success if it isn't... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view t

[Rails] Re: having terrible issue with resque ( & redis? ) spend 3 full days debugging. Can't assign requested address - connect(2). Anyone knows a solution?

2012-06-17 Thread Matt Jones
rake aborted! > Can't assign requested address - connect(2) > > This is telling you there's already something on a port that *something* is trying to use. As the error message suggests, try running the task with --trace to get a full trace - it will be much easier for people t

[Rails] searching on model and related attributes

2012-06-16 Thread Matt Harrison
Hi all, Haven't played with rails for a while so I'm a little stuck. I've got to make a search functionality across models. Let me try to explain this (sorry for lack of clarity, I've been reading so many search gems etc that I'm a little fuzzy now): * Stores have town and county fields * Stores

[Rails] Re: Play! 2.0 (Scala) or RubyOnRail (Ruby)?

2012-06-12 Thread Matt Jones
better replied anyway. > > Wow. Sends me an equally blustery direct email, then deletes the sending Gmail account within 12 hours. Naaah, not trolling at *all*... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

Re: [Rails] Enumerations - Best Practivce

2012-06-11 Thread Matt Martini
Guys, Thanks for the feedback. Would these approaches still be the way to go if you had a large-ish set of data, say State names of Country Names? Matt On Jun 11, 2012, at 5:37 PM, Paul wrote: > I do it in the model, too, and also validate that nothing else can get > in that column

[Rails] Enumerations - Best Practivce

2012-06-11 Thread Matt Martini
an option, or change to 'boy' and 'girl'. With only two values it seems pointless to have a whole model dedicated to this, yet it still needs to be somewhat dynamic as the values could change. What is the best practice for this type of data? Matt -- You received this messa

[Rails] Re: Play! 2.0 (Scala) or RubyOnRail (Ruby)?

2012-06-10 Thread Matt Jones
l preference for Play / Scala and begged others to flame you. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Ds6f7l

[Rails] Re: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' i

2012-06-09 Thread Matt Jones
but they didn't work for me. > > The autoloader is expecting to find Transactions::DummyDdnlTransaction in app/models/transactions/dummy_ddnl_transaction.rb - according to the Gist, you've got the file in the top level of app/models. Either move it, or manually require it. --Matt Jon

[Rails] Re: Expected … to define Base

2012-06-09 Thread Matt Jones
you may want to try learning it more idiomatically before dumping a jumbo-sized bucket of OO overdesign on it with all these modules... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion

[Rails] Re: How to install gem on hosting site without installing?

2012-06-08 Thread Matt Jones
7;s "changed", but did you try the -n option to `heroku logs`? Will give you as many lines as you care to look at... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the

[Rails] Re: Serialized attribute saved as HashWithIndifferentAccess in database

2012-06-02 Thread Matt Jones
's Hstore: http://www.postgresql.org/docs/9.0/static/hstore.html --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/yjHWHY

[Rails] Re: Is there a ftp crawler in ruby on rails?

2012-06-02 Thread Matt Jones
at Net::FTP, in the standard library: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/Net/FTP.html It should do what you're looking for. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Re: oauth for facebook and twitter

2012-05-29 Thread Matt Jones
ceed? Any suggestions? > > I'd highly recommend the Railscasts on this issue: http://railscasts.com/episodes/235-omniauth-part-1 http://railscasts.com/episodes/236-omniauth-part-2 Should explain everything you'll need to know. --Matt Jones -- You received this message because yo

[Rails] Re: Setting Up A Rails App With Passenger

2012-05-28 Thread Matt Jones
work locally, you'll need to point DNS for eaa.mysite.com at your local IP. Adding a line like this to /etc/hosts should do the trick: 127.0.0.1 eaa.mysite.com --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quo

[Rails] Re: Connect reset by peer error

2012-05-26 Thread Matt Jones
#x27;;') > > Is there some particular reason you're using the semicolon separator here? Unless you've got a very weird server on the other end, the default separator for set_form_data (&) is almost certainly the correct thing to use. Also note that, given that you'

[Rails] Re: Newbie question - how to resolve 'wrong status line' error

2012-05-25 Thread Matt Jones
gt; > Looks like you've hit this issue: http://stufftohelpyouout.blogspot.com/2010/05/how-to-fix-nethttpbadresponse-wrong.html Adding the use_ssl option, as that example does, should sort things out. BTW, you may want to look into using one of the existing OAuth gems - there aren

[Rails] Re: undefined method `paginate'

2012-05-24 Thread Matt Jones
rely outdated and will cause you a lot of problems. See here for details: http://ruby.railstutorial.org/?railsspace=1 --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https

[Rails] Re: Getting model column names

2012-05-21 Thread Matt Jones
is: https://github.com/couchrest/couchrest_model/blob/master/lib/couchrest/model/properties.rb seems to indicate that what you're looking for could be accomplished with: BdsDataAuthor.properties_by_name.keys --Matt Jones -- You received this message because you are subscribed to the Go

[Rails] Re: Paperclip saving/retrieving files above public/

2012-05-09 Thread Matt Jones
rectory on > our webapps to look at every-bodies uploads. By using our own custom > folders we can prevent this with very little code. > > By correctly configuring your server, you can prevent this without *any* code. "Options -Indexes" on Apache, "autoindex off"

[Rails] Re: [rspec-users] rspec-2.10 is released!

2012-05-05 Thread Matt Wynne
nerated view specs > (Jonathan del Strother) > > ___ > rspec-users mailing list > rspec-us...@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users Maybe you need some tests for this email template ;) cheers, Matt -- Freela

[Rails] Re: validating input values(integer)

2012-05-04 Thread Matt Jones
e } > > I'm not sure what effect this syntax will actually have, but it's not the one you're looking for. The line in your model should look like this validates :price, :numericality => { :only_integer => true } (note the plural 'validates' rather than 'val

[Rails] Re: ActiveRecord has_many :finder_sql

2012-05-03 Thread Matt Jones
ion with :finder_sql has no effect, as the :foreign_key option is ignored. - has_manys are typically spelled with the plural version; has_many :directions rather than has_many :direction. Not an actual bug, but a serious annoyance for anybody reading your code later. --Matt Jones -- You received t

[Rails] Re: Scaffoldings should be made in a temporary folder.

2012-05-02 Thread Matt Jones
example - scattering them into a folder full of non-working examples would make that much more difficult. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.go

[Rails] Re: Please help --> Getting error ERROR NoMethodError: private method `gsub!' called for #

2012-04-26 Thread Matt Jones
dated tutorial from the RailsSpace authors, so you're not learning the 2007 version of the framework: http://ruby.railstutorial.org/?railsspace=1 --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this

[Rails] Re: To developers of Rails: Feeble documentation - weakness of Ruby and the Ruby on Rails (2nd editi

2012-04-25 Thread Matt Jones
o do anything BESIDES whine on this forum / mailing list? At this point, I'm not even sure which particular missing documentation you're using as an example - method_missing is clearly defined in the stdlib docs, and even if it wasn't this would be the *wrong list* to discuss ad

[Rails] Re: Receiving and processing emails with Ruby - SMTP server

2012-04-22 Thread Matt Jones
ng mail, retrying deliveries, ratelimiting spammers, verifying SPF + DKIM headers, etc: all stuff that you'd have to re-implement manually with a Ruby server. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

Re: [Rails] Re: Trivial Rails Question, I am unable to explain the behavior

2012-04-21 Thread Matt Jones
On Friday, 20 April 2012 10:54:13 UTC-4, Ankur Jain wrote: > > > Thanks Matt, Your alternative method on how to best get the > data definitely is a much optimized solution then what I was using, I am > not using that and everything works great. > > However, I am still

[Rails] Re: Trivial Rails Question, I am unable to explain the behavior

2012-04-20 Thread Matt Jones
may want to check out the :counter_cache option of belongs_to, which will allow you to write this (correctly) as: @grades = Grade.where('worksheets_count > 0').all Also note that if counts are all you're looking for, you should avoid doing a find(:all) on them (as on Worksh

[Rails] Re: syntax error, unexpected tDOT3, expecting $end

2012-04-17 Thread Matt Jones
On Monday, 16 April 2012 10:21:03 UTC-4, Ruby-Forum.com User wrote: > > Hi Matt, > > I can't access the full rakefile at > http://aardvark-cms.googlecode.com/svn/trunk/build/rakefile.rb > > do you know hoe to access it? > Looks like Aardvark got devoured by Sit

[Rails] Re: syntax error, unexpected tDOT3, expecting $end

2012-04-14 Thread Matt Jones
cal code from the preceding figure. You may want to skip to the full version at the end: http://andypike.wordpress.com/2009/08/08/building-net-solution-with-rake-and-teamcity/ --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Use of SQLite database in production?

2012-04-11 Thread Matt Slay
I'm building a small Rails app that will be hosted somewhere online when it is finished. It will be a private app for a small non-profit organization with about 10 users and it will have about 3 main tables and a few lookup small tables. I think I'll be using Heroku to host the app. Even thinking i

[Rails] Re: Rails & PHP

2012-04-07 Thread Matt Jones
The files are typically named after the session token (found in "cookies['PHPSESSID']" in your controllers). PHP does some locking to avoid multiple writers messing the whole thing up, but I've only ever needed to *read* from the PHP session, so I'm not sure exactly how

[Rails] Re: one master table to hold symbols: good or bad idea?

2012-04-04 Thread Matt Jones
he other makes sense. If you're really just looking for the ability to attach context-sensitive labels, you may also want to look at acts_as_taggable_on and friends: https://github.com/mbleigh/acts-as-taggable-on which will do nearly all of the work for you. --Matt Jones -- You received

[Rails] Re: Ruby IDEs

2012-02-28 Thread Matt Slay
I highly suggest RubyMine. It is the most complete IDE I have used. http://www.jetbrains.com/ruby/ It cost $69 for a personal license. It's worth every penny. You can get a 30 day free license to test it out. People who tell you they don't use an IDE, but they use some text editor with a gazill

[Rails] Re: Export data to PDF

2012-02-19 Thread Matt Jones
which one is right for your app takes a LOT more information than your post provides... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To

[Rails] Re: I'm pleased to share my good experience with you...:)

2012-02-18 Thread Matt Jones
On Feb 17, 8:35 pm, Law Jer Cherng wrote: [SPAM SPAM SPAM SPAM omitted] > Never forget to share good things with us... =) Thank you Howsabout a banhammer? Does *that* count as a good thing, spammer? --Matt Jones -- You received this message because you are subscribed to the Google Gro

[Rails] Re: how to write query in sunspot solr

2012-02-18 Thread Matt Jones
en you've provided *no* information about how the data is stored in Solr... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from thi

[Rails] Re: what's wrong?

2012-02-12 Thread Matt Jones
the instance - so @current_layout will *always* be nil. To do conditional activation of callbacks, try the :if or :unless options. These take either a symbol representing a method or a proc. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&

[Rails] Re: How to get value text_field_tag from controller

2012-02-11 Thread Matt Jones
ithout Javascript, the only way an HTML input field's contents will get to your controller is via submitting a form... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonr

[Rails] Re: Clean Up the code

2012-02-06 Thread Matt Jones
osting, instead of just copying and pasting. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to ru

[Rails] Re: DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)

2012-01-16 Thread Matt Jones
to be: > > spec/views/contacts$ cat -n new.html.haml_spec.rb >      1    require 'spec_helper' >      2 >      3    describe "contacts/new.html.haml" do Does it go away if you change this to "contacts/new.html"? --Matt Jones -- You received this message because y

[Rails] Re: ActiveRecord: ar-each_model

2012-01-12 Thread Matt Jones
how not indexing the ID column - after all, instantiating all those objects only takes 90 seconds. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To uns

[Rails] Re: How to send a ASCII escape sequence to a Dot Matrix Printer

2012-01-09 Thread Matt Jones
ver. after doing some more digging, it looks like what you're looking for is nearly-impossible; I did find this: http://www.meadroid.com/scriptx/docs/printdoc.asp#rawprinting which sounds like it would do EXACTLY what you're looking for. Unfortunately it's IE-only, ActiveX, and

[Rails] Re: could not get 3xx (550)

2012-01-08 Thread Matt Jones
> > Attachments:http://www.ruby-forum.com/attachment/6889/Screenshot.png It's blowing up in an SMTP transfer - my guess is that whatever email server you've set up for ActionMailer is rate-limiting at 1000 emails. If you're just trying to set up some dummy user accounts, yo

[Rails] Re: How to send a ASCII escape sequence to a Dot Matrix Printer

2012-01-07 Thread Matt Jones
e unmatched quotes and/or an incorrectly formatted interpolation involved. Can you post the actual code? As for the control codes, that's going to be heavily dependent on the environment you're using to print. I'm not even entirely sure if a web browser *can* send raw text like you&#x

[Rails] Re: Zipcode validation

2012-01-07 Thread Matt Jones
to Ruby Hope this helps! --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+uns

[Rails] Re: Finding Username of the machine from which rails app accessed

2011-12-27 Thread Matt Jones
or-rails-application/ Never tried this, but it may work. Once you've got a username, you may want to use something like ActiveLDAP to grab more info from your Active Directory server. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: anonymous user modeling

2011-12-12 Thread Matt Jones
ated users will *also* have SMS / email / etc. I'd typically just borrow the existing User machinery but add in a flag ("anonymous", for instance) that skips the registration parts. --Matt Jones -- You received this message because you are subscribed to the Google Group

[Rails] Re: Need Some Guides on Solr with Rails.

2011-12-04 Thread Matt Jones
`new' If you've got Solr working with Tomcat, then you won't need sunspot_solr (the packaged server) at all. All you need in that scenario is the files generated by: rails generate sunspot_rails:install and a correct config file in config/sunspot.yml. In particular, you may need to

[Rails] Senior Software Developer Needed at Alert Logic in Houston

2011-12-02 Thread Matt Siver
raight-year-1593542.htm Matt Siver | Senior Recruiter Alert Logic, Inc. Direct: 512-904-1018 msi...@alertlogic.com<mailto:msi...@alertlogic.com> | www.alertlogic.com<http://www.alertlogic.com/> __._,_.___ __,_._,___ -- You received this message because you are subscribed to

[Rails] Re: Needs rails developer for a great opportunity!

2011-11-29 Thread Matt Jones
he music from the Flash intro on the site is any guide, I suspect either Michael Bay or James Cameron is involved... ;) --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t

[Rails] Re: This is not the error: ActionView::MissingTemplate

2011-11-25 Thread Matt Jones
ugin/blob/rails3/rails_installer_files/rubyamf_controller.rb#L29 If an exception occurred in that method, the rescue block would result in the behavior you've described (it doesn't render - FFS, it doesn't LOG. Somebody should be fired.) --Matt Jones -- You received this message b

[Rails] Re: ActiveRecord::AssociationTypeMismatch

2011-11-25 Thread Matt Jones
quot;, >  "name"=>"gino"}, >  {"id"=>"2", >  "name"=>"pino"}]}}, >  "id"=>"7", >  "format"=>"xml"} Looks like you need a slightly different format for the XML:

[Rails] Re: Inline symbols

2011-11-24 Thread Matt Jones
   # ":return"       => :return >         else $1.to_s                                   #return unknowns as is > (nothing should hit this) Again, $1 will not be set here. x.to_s would be a suitable default. > I also am unsure how the case structure can detect if the e

[Rails] Re: Inline symbols

2011-11-23 Thread Matt Jones
;splat" operator. It takes an array and fills in the arguments to the method with each element (simplified description). Your code would end up looking like: items = text.split(/,\s?/) ele.send_keys(*items.map {|x| case x when /^'(.*)'$/ then $1# "'

[Rails] Re: ActiveRecord :dependent fails for me

2011-11-22 Thread Matt Jones
e. > > I haven't tried @movie.destroy because I don't have a before or after > destroy callback defined. Actually you do - it's how :dependent is implemented. 99.9% of the time you want to call destroy on AR objects, not delete. --Matt Jones -- You received this message because you

[Rails] Re: Problem : Instance Variable or Application Constant Expiring

2011-11-17 Thread Matt Jones
h is user specific and not same for all users. Short of doing something horribly icky like "put a hidden field on every page and make all actions use POST", I'm not certain there's a good solution for this. --Matt Jones -- You received this message because you are subscribed to the

[Rails] Re: functional testing API: GET versus POST?

2011-11-05 Thread Matt Jones
typically have request bodies - depending on your web server, the body may or may not make it all the way to Rails. More discussion here: http://stackoverflow.com/questions/978061/http-get-with-request-body --Matt Jones -- You received this message because you are subscribed to the Google Gro

[Rails] Re: Postgres match with regular expression

2011-11-04 Thread Matt Jones
issue. - if it's tens of thousands of records, you're probably screwed. DB- side lookups will still be slow, and loading everything into memory will also be slow. The MySQL manual mentions that you can use a DB column for the pattern in a REGEXP expression, so that might be looking into. -

[Rails] Re: impossible architecture??

2011-11-01 Thread Matt Jones
user's LOCAL copy of Quickbooks. On the other hand, that solution required additional custom software on the user's machine and was tricky to set up under the best of circumstances. I'd recommend you think hard about *why* you're trying to do such a thing before heading down that r

[Rails] Re: ActiveModel::Validations in another module?

2011-10-30 Thread Matt Jones
, :numericality_of=>{:greater_than => 0, > :allow_blank=>true} I think ActiveSupport::Concern is what you're looking for here - you could create a module that defines validations like this: module SomeModule extend ActiveSupport::Concern include ActiveModel::Validations included do

[Rails] Re: taking oDesk test

2011-10-29 Thread Matt Jones
On Oct 29, 2:00 am, anonymous odesk tester wrote: > bump! > > -- > Posted viahttp://www.ruby-forum.com/. Perhaps my previous reply was insufficiently clear: take your cheating crap elsewhere and GTFO. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Re: Multiple :on options?

2011-10-29 Thread Matt Jones
te isn't related to the controller action. From the docs: :on - Specifies when this validation is active. Runs in all validation contexts by default (nil), other options are :create and :update. --Matt Jones -- You received this message because you are subscribed to the Google Groups &

[Rails] Re: taking oDesk test

2011-10-23 Thread Matt Jones
a racecar. > Please help. Odesk tester You forgot to mention how you're going to distribute your salary to people on this list, since you clearly are hoping to get a job using skills you don't actually have. I'm sure it was just an oversight. --Matt Jones -- You received this mes

[Rails] Re: Active Record Model From Legacy query

2011-10-20 Thread Matt Jones
a more standard layout and then work from there. Oh, and LART the daylights outta whoever thought *that* design was a good idea. ;) --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this grou

[Rails] meta tags via helper - assistance needed

2011-10-17 Thread Matt Martini
meta content output. I thought the "|| meta_block" would cause the helper to be called if :meta_block was not set. How do I get all of the metat tags to be output on the page, and how do I get it to happen if there are no per page keywords and description? Thanks, Matt #application_h

[Rails] Re: Model.find(:all, :conditions …) on one field for one key-value from a hash?

2011-10-03 Thread Matt Jones
string :to_emails, :multiple => true do to_hash.map { |x| x['email'] } end ...etc... end end Searching is pretty straightforward: Email.search do with :to_emails, 'j...@test.com' end This will also be a huge help when the inevitable, "Hey, can we search

[Rails] Re: streamline DB: 128341ms to below DB:200

2011-10-02 Thread Matt Jones
de them at all? - verify that the database has the required indexes. You'll want to use Oracle's 'EXPLAIN PLAN' functionality to see what's actually going on: http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/ex_plan.htm#g42231 --Matt Jones -- You receive

[Rails] Re: codeigniter new comer

2011-10-02 Thread Matt Jones
ombined with the Guides is pretty much exactly what the Codeigniter site provides. For api.rubyonrails.org, you'll typically want to start with the 'Base' classes, as they tend to provide the most introductory documentation (so go to ActiveRecord::Base, ActionController::Base, etc). --

[Rails] Re: alternate better way to write

2011-10-02 Thread Matt Jones
ecomes: Unit.transaction do @units = Unit.where(:assigned => false) @units.each do |unit| unit.create_initial_property end end If the @units variable isn't used anywhere else, you could also just combine the two statements and skip it entirely. There are also some shorter way

[Rails] Re: Simple Association

2011-10-02 Thread Matt Jones
ame; ActiveRecord uses that name internally, and redefining it may cause extremely peculiar malfunctions. - if messages are paired strictly one-to-one with replies, it may make more sense to omit the intermediate model entirely and just define a has_one/belongs_to pair. --Matt Jones -- You received th

[Rails] Re: Problem with development mode and "cached" array in lib file

2011-10-02 Thread Matt Jones
do exactly the same thing without causing problems in development mode AND without pulling the entire database of products into memory... The underlying issue (I suspect) is that the array gets cached with the initial version of the Product class, but subsequent reloads in development mode redefin

<    1   2   3   4   5   6   7   8   9   10   >