RailsCasts Pro episodes are now free!

Learn more or hide this

Radha's Profile

GitHub User: rbritom

Comments by Radha

Avatar

Akshay Rawat 's post that refers to a video where all of my worries are presented along the reasons why I havent done much more than design and prototypes apps with document based DB and never in production.

Avatar

Well i have had the same problems she is talking about at the design face, i have never implemented document base db because of all she said. Still i think things are changing because most node.s projects use mongodb and node.js's community is growing very fast.

Avatar

Thanks Ryan great episode as always.

What i find a bit hard to implement in document base DB are trees and has_many through associations.

Avatar

evented is not the same as threaded they have differente uses. Evented uses less resources too.

Avatar

Nice episode!

I have issues trying to test blocking input into a text field. I made a jQuery plugin that forbids inputing number, spaces, or chars, but since triggering keypress, keyup or keydown dont actually print the value into the text field (it trigger the event but does not puts a value there) i have no way of making the correct expectation (not even with the sendkeys plugin).

Anyone knows how to test this kind of things?

Avatar

Can anyone tell me how this kind of frameworks handle file uploads, since ajax upload is not standardized?

Avatar

Meteor is running on Node.js. As javascript was a client side only script it lacked functionality to make it run on the server, for example there was no api for IO interaction in javascript (no way to access the hard drive), the team of Node.js build a non blocking IO api and since node is recent the api is very modern.
Now Node.js runs on top of V8 , and all (that i now of) server side javascript plaforms run on top of Node.js. Backbone.js is a client side technology so it not related to Node.js. For an extensive explanation of what is cool about node and what it really is read this thread http://stackoverflow.com/questions/3436335/could-node-js-replace-ruby-on-rails-completely-in-the-future

Avatar

Well meteor looks as magical as Rails did the first time i saw Rails, I mean , where is the db connection set? I know everything is work via CoC but wow that is one slim app.

I believe that is even if meteor or similar clients side technologies don't replace Rails eventually there is a very high possibility they could replace sinatra apps since I use sinatra for very similar applications and meteor does seems to be a quicker/slimmer/awesomer solution.

Avatar

on Unix/Linux based systems remember that environment variables almost always refers to the operating systems is user/session/machine variables, not application configuration files.

Avatar

I would like to note that if you want use image_tag in a mailer you have to set

ruby
config.action_mailer.asset_host = 'www.yourhost.com'

so that image_tags have the right source in the email

it will turn this

ruby
 # all images are broken
<img src="/images/icon.png" alt="Icon" />

into this

ruby
 # all images are fine
<img src="www.yourhost.com/images/icon.png" alt="Icon" />

since config.action_mailer.default_url_options has no effect on image_tag

Avatar

Excellent. Ryan, i have notice you havent touched integrating rails with social networks, any hopes for seen that in a future episode?

Avatar

What a great episode. Thnx Ryan.

I am a bit disappointed that most cookbooks ignore Mac OS X server. :(

Avatar

Since you are already overwriting stuff you could try this in an initializer

ruby
    module Globalize

    class << self

        def fallbacks(locale = self.locale)
          case locale
          when :en then [:de, :wk]
          when :wk then [:de, :en]
          when :de then [:wk, :en]
          end
        end

      end
    end

Non tested and found at stackoverflow but seems like it could work. Checkout the thread to see more details
http://stackoverflow.com/questions/7942450/is-it-possible-to-make-rails-i18n-locales-fallback-to-each-other

Avatar

and project started!!!!
The one ryan mentioned

Avatar

Joe please post here if the bug Ryan mentioned has been fixed, im about to try Refinary , im just waiting for that fix.

Avatar

i was looking into several rails cms a about a year or so ago and none had good documentation. I just checked the new Refinary docs and they are much better than what i remember.

Avatar

I tried Refinary a long time ago but there is no good documentation, it must have taken you quite some time digging through the source code to figure all this out ryan

Avatar

I'm confuse, is this like compass?

Avatar

verify that you can access the category_id column via mass assignment.
Add category_id to the attr_accessible declaration in your model

Avatar

does this works well along a mulit user rvm installation? will it correctly load my rails environment based on the .rvmrc file?

Avatar

wow , i didnt know about dom_id, you know how many places have used interpolation instead?... :(

=D good thing i learned this , thanks Ryan.

Avatar

There used to be a gem that put this into the DB and had an interface , why has everyone move way from that? is there something wrong with that approach?

Avatar

SWEET!!!!!!!

Ill use it in my next project which starts tomorrow. Thanks for sharing.

Avatar

I was using VCR and come into a particular problem, i do no communicate to the web service directly i first establish a reverse ssh tunnel to another computer in the network, so i could not figure a way to capture the request. Any suggestions?

Avatar

Oh, one other thing, it is also posible and very easy to read the values with nokogiri using a css selector.

doc = Nokogiri::XML(response.to_xml)
zipcode = doc.css("USzip").inner_text

I find it most useful when dealing with collections

doc.css('ProductCode').each do |product|
    ...blah
end
Avatar

there are 3 types of errors, one from the SOAP service it self, one from savon and one from the communications gem ( timeout error or no response) for the first one the web service should be able to notify of the error somehow (return a status tag) so you can handle that without the need of a begin rescue block the other cases are handled with with beging rescue.

Avatar

Awesome as alway.
Ryan i will take this opportunity to motivate a topic that i think you have work with and i did have to solve when dealing with savon. The web service i comunicate with takes a couple of second to respond ( the rails app waits and does not answer to user request), so i took an approach i saw you using in episode 243, i used beanstalk and stalker, but then came the problem of updating the view instantly without the need to refresh the page when stalker/beanstalk finish.

Apparently i was the only one who didnt know how it was done but i still could not find a good example. Then in episode 281 i saw you were using faye with stalker.

I did figure out how to update the view with faye from stalker, but, could you touch this topic in a future episode? i think is a very common problem and there is not much documentation out there about how to update the view asynchronously after a background process finishes working.

Avatar

Wow soooo awesome i always neglected engines but from now ill see how i can apply them to my apps