[Rails] Re: Model.Save causing nil object error

2009-10-14 Thread Sijo kg
Hi Matthew Shapiro I think you are trying for uniq entry in join table(here relationship_topics).That you can do on db level In the migration file for this join table you can add after the creation of the table an index like add_index :relationship_topics, [:relationship_id,

[Rails] Re: rake test vs rake test RAILS_ENV=test

2009-10-13 Thread Sijo kg
Hi Nathan Beyer I did not see any error.But why are you doing like this.No need to specify RAILS_ENV=test The explanation is If execute from konsole rake#This run all tests rake test:units #Run all unit tests only rake test:functionals #Run only functional tests Sijo -- Posted

[Rails] Re: Heavy reports with a lot of calculations

2009-10-09 Thread Sijo kg
Hi Goin Tan In our project we use for generating excel reports the gem 'spreadsheet' http://rubyforge.org/projects/spreadsheet/ For pdf reports we use the gem 'prawn' http://prawn.majesticseacreature.com/ Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Using AJAX to generate complex forms interactively - any guides?

2009-10-08 Thread Sijo kg
if @sub_categories == nil. Hi Check @sub_categories.blank? Sijo -- 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,

[Rails] Re: Using AJAX to generate complex forms interactively - any guides?

2009-10-07 Thread Sijo kg
Hi You can have a look at protype helper observe_field http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: Form_for with namespace

2009-10-06 Thread Sijo kg
Hi Bryan L wrote: This is what I have in my routes.rb: map.with_options(:namespace = admin) do |admin| admin.resources :designs end You have to modify your routes as map.namespace(:admin) do |admin| admin.resources :designs end And also generate controller and model like

[Rails] Re: Custom class

2009-10-06 Thread Sijo kg
Hi Pål Bergström Can you paste the code? Sijo -- 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 email to

[Rails] Re: handling validation errors

2009-10-06 Thread Sijo kg
Hi Sharanya Suresh This you can also do with only a slight modification to submit_to_remote like %= submit_to_remote 'create', 'Create', :url = {:action = 'create'}, :update = {:success = 'success_div', :failure = 'failure_div'} % No other change in controller So for example if

[Rails] Re: Custom class

2009-10-06 Thread Sijo kg
Hi Thanks. I don't fully understand but it works. This means you don't need to require it (?) No require needed .And to get a good understanding of class and instance methods in Ruby read http://railstips.org/2009/5/11/class-and-instance-methods-in-ruby Sijo -- Posted via

[Rails] Re: Errno::EADDRINUSE

2009-10-06 Thread Sijo kg
Or kill the existing process From konsole type netstat -nlp|grep rubyFind out the PID Now kill -9 processid Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Custom class

2009-10-06 Thread Sijo kg
Hi Pål Bergström That was great. Thank you. Still not sure about instance and what it means. It is not a difficult thing to grasp Just an example Suppose you have a class Fruit.Now an apple and an orange are instances of the class Fruit. So in Ruby it can be created like apple =

[Rails] Re: Processing an XML list in a controller

2009-10-06 Thread Sijo kg
suggesting gem nokogiri too Sijo -- 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 email to

[Rails] Re: creating 2 things at the same time?

2009-10-05 Thread Sijo Kg
Hi Mike Chai What I understood is you have relations like comment has_one picture picture belongs_to comment As an example comment name:string picture name:string,comment_id:integer So do as below in comments_controller new action @comment = Comment.new @comment.picture = Picture.new

[Rails] Re: creating 2 things at the same time?

2009-10-05 Thread Sijo Kg
And assuming you are on rails 2.3 -- 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 email to

[Rails] Re: Generating new div when link is clicked

2009-10-01 Thread Sijo Kg
Hi You have to understand any ajax fashioned link One example link_to_remote http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001645 read it..Now also have a look at insert_html

[Rails] Re: How to validate presence of phone number or mobile phone.

2009-09-29 Thread Sijo Kg
Hi i want it to appear only one message tell that phone number or mobile number can't be blank, how could i do that. You can do like def validate validate_phone_and_mobile([mobile_number,phone_number]) end def validate_phone_and_mobile(numbers)

[Rails] Re: Access to session variable in model

2009-09-29 Thread Sijo Kg
Hi Adam Meyer Is there a possibility to get access to session values in model files? You can't do that and if any means doing that means violating MVC . What you can do is to pass the session variable from controller to model For example in the image.rb you have a def do_this(session_id)

[Rails] Re: How to validate presence of phone number or mobile phone.

2009-09-28 Thread Sijo Kg
Hi As an example validates_format_of :phone_number,:allow_nil = true,:with = /regex here/ Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: How to validate presence of phone number or mobile phone.

2009-09-28 Thread Sijo Kg
Hi What I understood is you have to check presence of phone number and mobile number But not at the same time Right? If so please try the following Assuming you have the fields phone_number and mobile_number validates_presence_of :mobile_number,:if = :phone_number_blank_check

[Rails] Re: Rails Library for Generating Graphs and Charts

2009-09-24 Thread Sijo Kg
Hi Even not free (XML/SWF and DIY Map) you can just check this also http://ziya.liquidrail.com/ Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: collection_text onchange event

2009-09-23 Thread Sijo Kg
Hi Have a look at observe_field http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001654 Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: A security related question

2009-09-21 Thread Sijo Kg
Hi In application controller you can say like for example filter_parameter_logging :password (where password is the field name) This the /password/i will be replaced by the value [FILTERED] Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How to get value from link_to_remote's :with paramenter?

2009-09-21 Thread Sijo Kg
Hi It should work.And what error you get? Also paste the code for textfields discount_code and tariff_plan_id Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: How to get value from link_to_remote's :with paramenter?

2009-09-21 Thread Sijo Kg
H Vikas %input{:type='radio', :name='tariff_plan_id', :value=#{plan['service']['name'].downcase}_#{plan['payment_term']['name'].downcase}} Give also give an id to this id='tariff_plan_id' Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: Find the gems and plugins used in Rails Application

2009-09-21 Thread Sijo Kg
Just saw this. Would like to know what is Litwin's answer? -- 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 email to

[Rails] Re: A security related question

2009-09-21 Thread Sijo Kg
Yes you are right -- 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 email to rubyonrails-talk@googlegroups.com To

[Rails] Re: for crontab

2009-09-21 Thread Sijo Kg
Preksha but what's this?? 0 0 * * * cd /var/www/apps/rails_app/ /usr/local/bin/rake RAILS_ENV=production utils:send_expire_soon_emails This is how we setup cron entries. In this case what it means is Every midnight (12 am) go to the project root and run the rake task in production

[Rails] Re: Plugin Install from tgz or zip file

2009-09-21 Thread Sijo Kg
Hi Josh Actually what you extracted from the tar is the plugin itself. No need to install it. Just move it to vendors/plugin folder Or As Marnen Laibow-Koser said install the git client and then from the same vendor/plugin folder type git-clone git://github.com/ambethia/recaptcha.git

[Rails] Re: How to get value from link_to_remote's :with paramenter?

2009-09-20 Thread Sijo Kg
Hi Is it solved? Once more try exact this Cannot see anyother error. link_to_remote Apply, :update = result, :url = {:action = discount_code}, :with = 'discount='+$('discount_code').value And in controller params[:discount] Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How to get value from link_to_remote's :with paramenter?

2009-09-20 Thread Sijo Kg
Hi Vikas :with ='discount='+ escape($('discount_code').value) + 'discount2=' + escape($('discount_code2').value) Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: for crontab

2009-09-20 Thread Sijo Kg
Hi Preksha Read this http://railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial Sijo -- 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

[Rails] Re: 2 submit buttons, how to identify which pressed in the controller?

2009-09-15 Thread Sijo Kg
Hi You can check params[:commit]In first case its value is 'First' and in second it is 'Second' Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: PDF document viewer in rails

2009-09-15 Thread Sijo Kg
Hi mahesh Please check http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000421 An example is send_file 'filepath', :disposition = 'inline',:type = 'application/pdf' Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Multiple Nested Resources and Routes

2009-09-15 Thread Sijo Kg
Hi Do like in routes.rb map.resources :projects do |project| project.resources :assessments do |assessment| assessment.resources :findings end end Now the helper for /projects/1/assessments/1/findings/1/ is project_assessment_finding_url(projectid,assesmentid,findingid)it will

[Rails] Re: Need help on Many to Many Relationships

2009-09-14 Thread Sijo Kg
Hi Read these http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association

[Rails] Re: Transaction blocks and rollbacks

2009-09-14 Thread Sijo Kg
Hi Jesse Crockett Like ActiveRecord::Base.transaction do #paste your code here end Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Nested Routes Best Practices

2009-09-14 Thread Sijo Kg
Hi Steve Alex I cant understand why you need map.resources :items, :only = [:index] since item always coexist with lists So why it treated as seperate? Cant you do like map.resources :lists, :shallow = true, :has_many = :items And then in index of items as def index @list_items

[Rails] Re: Cannot get my password to validate

2009-09-12 Thread Sijo Kg
Hi You can solve it like @user.password = Digest::SHA1.hexdigest(@user.password) if @user.valid? Change only the above line . What happens in your code is empty string also gets digested So fails validation. Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Installing Rails problem

2009-09-11 Thread Sijo Kg
Hi Hva you tried sudo gem install rails Sijo -- 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 email to

[Rails] validates_preence_of :name

2009-09-02 Thread Sijo Kg
Hi I have a name field And it has no validation And when I update that field with this !...@#$%^*()_+|}{:?,./;'[]\ It gives error /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:557:in `transaction'

[Rails] who is Why? And why he disappeared?

2009-08-27 Thread Sijo Kg
Hi Have you read this? http://www.globalnerdy.com/2009/08/20/how-and-where-is-_why/ Why this person vanished?Anyone knows? And actually who is he? Why did he do that? Please share your thoughts Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Route Problem

2009-08-21 Thread Sijo Kg
map.resources :jobs do |job| map.jobs :comments end Hi change this to map.resources :jobs do |job| job.resources :comments end map.resources :companies do |company| map.company :jobs, :only = :show end Change this to map.resources :companies do

[Rails] Re: Can :conditions use an array and a dictionary together?

2009-08-20 Thread Sijo Kg
Jeffrey L. Taylor wrote: Quoting CoolAJ86 coola...@gmail.com: [:jobs, :photos]) :conditions = jobs.name LIKE 'Teacher%' AND group_id = #{current_contact.group} HTH, Jeffrey Passing a string to :conditions like this welcomes sql injection attacks So can it be avoided and pass an

[Rails] :only option in route 2.2.2

2009-08-14 Thread Sijo Kg
Hi I have my application rails version 2.2.2 And this thing map.resources :users, :only = [:index] do |u| u.resources :categories end when I tried this in 2.3.2 rails I get what I required Means it only cretes user index and then all other routes for categories ..But when I tried it on

[Rails] Re: :only option in route 2.2.2

2009-08-14 Thread Sijo Kg
Hi I think I could solve this by writing in 2.2.2 like this..Could I? map.resources :users, :only = [:index] do |u| u.resources :categories, except = [] end And the routes generated in 2.2.2 users GET/users {:controller=users, :action=index}

[Rails] Re: Testing controller

2009-08-13 Thread Sijo Kg
Hi Once I have answered this Suppose if you are using a session varible person_id it can be done like for example in test_helper just write a def like def login_as(person) @request.session[:person_id] = person ? person.id : nil end And from your test call this by passing

[Rails] Re: Testing controller

2009-08-13 Thread Sijo Kg
Hi Jim Burgess You can do same also like user @request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user.email,password) And you can move it to a function as I said above Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Doubt in joins condition?

2009-08-11 Thread Sijo Kg
Hi you get agencies for each contract like Contract.all.each { |c| c.agencies } Here you get each contract information too For example Contract.all.each do |c| c.name #contract name c.agencies end Can collect it to an array like array = [] Contract.all.each do |c| array

[Rails] Re: Doubt in joins condition?

2009-08-11 Thread Sijo Kg
Hi Karthik For example consider this data_array = [] Contract.all.each do |c| data_array [c,c.agencies] end Now in view you can iterate thru this like data_array.each do |arr| puts arr[0].name arr[1].each do |sub_arr| puts sub_arr.name end end You can modify this

[Rails] Re: assert_recognizes example throws syntax error

2009-08-11 Thread Sijo Kg
Hi This will work assert_recognizes({:controller = 'birds', :action = index},birds) Sijo -- 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

[Rails] Re: Assignment with ?

2009-08-11 Thread Sijo Kg
Hi brianp The operator has many different uses: A googling gave In an Array it is used to append (push) an object into a given array In a Fixnum and a Bignum object it shifts the number bits to the left In an IO object it will write the object (as a string) to the IO object. In a

[Rails] Re: fixtures, factories and the standard testing framework.

2009-08-11 Thread Sijo Kg
Hi And none of you here specified http://www.thoughtbot.com/projects/shoulda/ a framework Which extends Test::Unit . So I think not a very big learning curve needed for a Ruby programmer unlike some other tools you specified Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: how to delete record from two table

2009-08-10 Thread Sijo Kg
Hi If what I understood from your description right, you have to check :dependent = :destroy Assuming your relationship is has_many :through you can do like in model Service like has_many :services_users, :dependent = :destroy has_many :users, :through = :services_users similary in

[Rails] Re: paging in ror

2009-08-10 Thread Sijo Kg
Hi please read the example usage here at home http://github.com/mislav/will_paginate/tree/master Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Re: Controller in subfolder help

2009-08-10 Thread Sijo Kg
Hi Kostas Lps Read this thread http://www.ruby-forum.com/topic/192938 Sijo -- 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

[Rails] Re: how to delete record from two table

2009-08-10 Thread Sijo Kg
Hi To get a good understanding first read these http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Show validation error messages from a nested model?

2009-08-10 Thread Sijo Kg
Hi format.html { render :action = new } this says to render new action of comments controller Is that you need or you have to render show action of movie If that then you can say render :action = ../movies/show instaed of format.html { render :action = new } Sijo -- Posted via

[Rails] Re: Doubt in joins condition?

2009-08-10 Thread Sijo Kg
And what are the relationships between these models? Sijo -- 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 email to

[Rails] Re: Doubt in joins condition?

2009-08-10 Thread Sijo Kg
Hi Karthik Kantharaj Ok One more thing please tell what you are trying to attain with the above query? Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: initializers

2009-08-07 Thread Sijo Kg
Hi You can do it like Suppose you have a logfile say my_log_file.log in log folder Then file = File.open('log/my_log_file.log', 'a') logger = Logger.new(file) logger.info(Running tasks) Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: initializers

2009-08-07 Thread Sijo Kg
And you need not create it It will be created automatically for you Sijo -- 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,

[Rails] Re: update partial after submit need Help

2009-08-07 Thread Sijo Kg
Hi first of all give an id to the div and then update it Sijo -- 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

[Rails] Re: Newbie Confusion re underscores / camel case

2009-08-07 Thread Sijo Kg
Hi The first parameter to belongs_to is the association id So here auction_item_id being the foreign key according to convension by rails we can say belongs_to :auction_item It will be taken as auction_item_id For example you can try t.belongs_to :auction_item instead of

[Rails] Re: Simple Syntax error

2009-08-07 Thread Sijo Kg
And this is the corrected program. puts 'What is your first name?' first_name = gets.chomp puts 'Middle name?' middle_name = gets.chomp puts 'Last name?' last_name = gets.chomp full_name = first_name + middle_name + last_name puts 'did you know there are ' + full_name.length.to_s+'characters ' \

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-07 Thread Sijo Kg
Hi you can do like ./script/generate scaffold Admin::Publisher Here the model be namespaced And if you need only controllers and view you can do it seperately ./script/generate controller Admin::Publisher ./script/generate model Publisher And edit routes.rb map.namespace(:admin)

[Rails] Re: Redirect after login

2009-08-07 Thread Sijo Kg
Hi And what is wrong now? Did you ensure if session[:engine_host] is not set it enters to unless session[:engine_host].end For example write some puts inside unless session[:engine_host]..end And check if that happens according to what you specify Sijo -- Posted via

[Rails] Re: Redirect after login

2009-08-07 Thread Sijo Kg
Hi There you have to use and return as I said earlier.. Please read2.2.13 Avoiding Double Render Errors from http://guides.rubyonrails.org/layouts_and_rendering.html Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-07 Thread Sijo Kg
Hi Not only doing the above solves all..You have to edit a lot of places. Rather than I explain all these and grab a lot more spaces here you better read this Read section Namespaced Routes in http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial Sijo --

[Rails] Re: nomethoderror : undefined method post

2009-08-06 Thread Sijo Kg
Hi Jyothsna Vu form action=story/new method=post It is normally form action=stories method=post route are gennerated for new Please tell how did u generate all? Did u use scaffold etc Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Shared partial working with controller

2009-08-06 Thread Sijo Kg
Hi Can't you use like render :partial = shared/partial_name, :locals = {:books = @books} Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Redirect after login

2009-08-06 Thread Sijo Kg
Hi def verify_login unless session[:engine_host] redirect_to :controller = 'job', :action = 'index' return false end return true end Can u change it to def verify_login unless session[:engine_host] redirect_to :controller = 'job',

[Rails] Re: Redirect after login

2009-08-06 Thread Sijo Kg
redirect_to :controller = 'job', :action = 'index' and return false -- 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

[Rails] Re: Ajax

2009-08-06 Thread Sijo Kg
Hi Please paste the code where the error is supposed to b happen Sijo -- 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,

[Rails] Re: I'm new

2009-08-06 Thread Sijo Kg
Hi Read this http://guides.rubyonrails.org/association_basics.html#has-and-belongs-to-many-association-reference Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Ruby 1.9.1

2009-08-06 Thread Sijo Kg
Hi Read this thread http://www.ruby-forum.com/topic/189637 Sijo -- 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

[Rails] Re: rjs template: reload div

2009-08-06 Thread Sijo Kg
Hi page[:my_div].reload is equivalent to page[:my_div].replace :partial = my_div So why can't you use page[:my_div].replace :partial = /my_folder/some_partial Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: Redirect after login

2009-08-06 Thread Sijo Kg
Hi If it is needed by more controllers not only jobs controller you can move it to application.rb and the filter too..Does it call the filter? Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: initializers

2009-08-06 Thread Sijo Kg
Hi Did you try the example I said. I tested it and working for console and server starting (Not passenger) Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Redirect after login

2009-08-06 Thread Sijo Kg
Hi Please do like Application controller as it is class ApplicationController ActionController::Base helper :all # include all helpers, all the time protect_from_forgery # See ActionController::RequestForgeryProtection for details # Scrub sensitive parameters from your log #

[Rails] Re: MySQL noob question: Where can I find the database when I create one?

2009-08-05 Thread Sijo Kg
Hi If you installed in c drive then the location will be C:\mysql\data\ And one more thing to create/drop your development,test,production dbs need not go to mysql console There are rake tasks for that From your project directory do rake db:create #creates developmentdb you

[Rails] Re: About joinTable

2009-08-05 Thread Sijo Kg
Hi Assume tables arenames, addresses So the junction table should be addresses_names by default This can be override if needed.. And the join table wont have id column This is has_and_belongs_to_many(HABTM) Have you setup relationships properly If so you can get all the

[Rails] Re: Help for Functional Testing?

2009-08-04 Thread Sijo Kg
Hi Can't say what happens only based on this. Anyway please change above to def test_should_create_county County.destroy_all assert_difference('County.count') do post :create, :county = {:name=myname,:description=mydesc,:region_id=3 } end assert_redirected_to

[Rails] Re: Rails sites

2009-08-04 Thread Sijo Kg
Nice but not what required -- 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 email to

[Rails] Re: Help for Functional Testing?

2009-08-04 Thread Sijo Kg
Hi Check for any unsatisfied validations Sijo -- 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 email to

[Rails] Re: Help for Functional Testing?

2009-08-04 Thread Sijo Kg
Just to know which version of rails r u using Please check this http://guides.rubyonrails.org/testing.html Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: webcam image capturing

2009-08-04 Thread Sijo Kg
Hi Do you plan to use a low-res usb webcam, a IP camera, or a high def style video camera? I want to use a basic web cam, to monitor certain sites, kind of surveillance camera system. Do you want to capture frames or a video stream? I want to capture a video stream in moderate quality.

[Rails] Re: Rails sites

2009-08-04 Thread Sijo Kg
Hi Thanks This I have already got Sijo -- 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 email to

[Rails] Re: Help for Functional Testing?

2009-08-04 Thread Sijo Kg
Yes as Fred said you need that and suppose if you are using a session varible person_id it can be done like for example in test_helper just write a def like def login_as(person) @request.session[:person_id] = person ? person.id : nil end And from your test call this by passing

[Rails] Re: Rails sites

2009-08-04 Thread Sijo Kg
Hi Thanks for all this information.I had to convince one group who had the authority to take decision on whether there next work in rails..And I think to make such an effort make me proud myself to say o a new project started in rails by someone Thanks Sijo -- Posted via

[Rails] webcam image capturing

2009-08-03 Thread Sijo Kg
Hi Could anybody please advice me to work with wecamera in Rails. What i want to do is to capture webcam images from a machine and send that data to a remote server there it needs to be processed. I have no idea of where to start.Please help Thanks in advance Sijo -- Posted via

[Rails] Re: webcam image capturing

2009-08-03 Thread Sijo Kg
Hi and to be more precise I need something like this http://www.ustream.tv/get-started Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Rails sites

2009-08-03 Thread Sijo Kg
Hi Could you please give list of some popular sites which handle very huge data than twitter and more faster than that? Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: For GIS applications

2009-08-02 Thread Sijo Kg
Hi Yes I want to draw maps, dealing with geocoded data, As exacltly according to the latlong information have to draw routes on map etc So could you please suggest a good gem and also the other helper urls if any Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Trouble understanding Routes

2009-08-02 Thread Sijo Kg
E. Litwin wrote: Sijo, That is not necessarily good advice. You don't always need (or want) these default routes. Even the comments produced automatically when creating a new Rails app tell you this: # Install the default routes as the lowest priority. # ...You should consider

[Rails] For GIS applications

2009-07-31 Thread Sijo Kg
Hi Could anybody please which is the most widely used gem for GIS applications I came across http://ym4r.rubyforge.org/ym4r-doc/ But seen it has not been updated since 2006 Thanks in adavnce Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Trouble understanding Routes

2009-07-31 Thread Sijo Kg
Hi brianp Your default routes should have the least priority Means map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' These should be at the very bottom of routes.rb Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Functional Test Failing

2009-07-30 Thread Sijo Kg
Hi To get a good understanding read this. I think you are totally confused http://guides.rubyonrails.org/testing.html Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: download file located outside rails aaplication folder

2009-07-30 Thread Sijo Kg
http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000421 Sijo -- 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

[Rails] Re: attachment_fu + :path_prefix

2009-07-30 Thread Sijo Kg
'public/uploads' i want a dyname path for e.g :path_prefix = 'public/#{ current_user.id}', Have you tried this like :path_prefix = public/#{ current_user.id} Instead of single quotes use double quotes Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: attachment_fu + :path_prefix

2009-07-30 Thread Sijo Kg
:path_prefix = public/#{current_user.id} -- 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 email to

  1   2   3   >