[Rails] Calling function from worker with delayed job in rails

2015-04-06 Thread amruby
I have one function, that have been working in *delayed job*. class TestDelay ActiveRecord::Base def start_worker tc = TestController.new #Here calling that main function endend also i have one other class class TestController ApplicationController before_filter

[Rails] Re: Not been able to insert data onto DB

2015-04-06 Thread amruby
Did u add these attributes in post.rb as attr_accesble On Monday, 6 April 2015 23:30:30 UTC+4, Ruby-Forum.com User wrote: Hi all, I am not been able to insert row into DB from the rails console. Command used: Post.create(:title =t1,:content =c1) Output : (0.2ms) begin transaction

[Rails] Re: How do I make forms work with no javascript enabled? (ActionController::InvalidAuthenticityToken)

2015-02-02 Thread amruby
Can you try like this %= form_for(@task, remote: true, authenticity_token: true, html: {'data-type' = 'html'}) do |f| % Thanks Vishnu On Tuesday, 3 February 2015 01:42:37 UTC+4, Yuri Kanivetsky wrote: Hi, I've got some basic form: %= form_for(@task, remote: true, html: {'data-type' =

[Rails] Rack-offline issue in rails 4 with more details

2014-09-29 Thread amruby
Recently i have posted this issue, so then i tried another way to cache the javascript and css, things like This is routes.rb offline = Rack::Offline.configure do cache ActionController::Base.helpers.asset_path(application.css) cache

[Rails] Re: caching not working with rack::offline in rails 4

2014-09-29 Thread amruby
Got the solution and sovled, that was the issue with JS On Sunday, 28 September 2014 19:34:43 UTC+4, amruby wrote: HI, I am trying to add the offline access with my *rails 4* application with the reference of railscast ( http://railscasts.com/episodes/248-offline-apps-part-2

[Rails] caching not working with rack::offline in rails 4

2014-09-28 Thread amruby
HI, I am trying to add the offline access with my *rails 4* application with the reference of railscast ( http://railscasts.com/episodes/248-offline-apps-part-2), but the problem with rails 4 is its not caching the *JS CSS* files. its seems like CACHE MANIFEST

[Rails] image attachment in mail with rails3

2012-07-31 Thread amruby
yes this will send one mail with attachment of image.png. But when i open or download that image, that is empty.? imageurl = https://chart.googleapis.com/chart?chs=150x150cht=qrchl=5choe=UTF-8 require 'open-uri' class UserMailer ActionMailer::Base default :from = m...@example.com def

[Rails] get an image from google chart api URL

2012-07-31 Thread amruby
how to get the image and save from this googleChart api URL. I am trying to do this for 3 days with open-uri, but i couldn't proceed that? https://chart.googleapis.com/chart?chs=150x150cht=qrchl=5choe=UTF-8 Thanks vishnu -- You received this message because you are subscribed to the Google

[Rails] download image in rails with javascript/jquery

2012-07-26 Thread amruby
in my rails app, i have got one URL * (http://chart.apis.google.com/chart?cht=qrchs=300x300chl=codechld=H|0)*in Javascript *view.html.erb* * * * td%= link_to QR,#, :onclick = showCode();%/td * script type=text/javascript var imageURL; var showCode = function () { imageURL = *

[Rails] getting company logo from LinkedIn api

2012-07-08 Thread amruby
the company logo from my current and previous companies. how to add the logo in the above URL...? Thanks amruby -- 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

[Rails] store activerecords value in rails

2012-06-28 Thread amruby
i have one query @recommendations = Cname.select(cnames.name,max(recommendations.count) as rcount). where('recommendations.skill= ?',@key). order('recommendations.company_id ASC'). group('recommendations.company_id,cnames.name').

[Rails] activerecord issues with rails 3 postgresql

2012-06-27 Thread amruby
i have one query @recommendations = Recommendation.select('cnames.name,max(recommendations.count)'). where('recommendations.skill= ?',@key). order('recommendations.company_id ASC'). group('recommendations.company_id').

[Rails] how to give controller return value into jquery.html()

2012-06-26 Thread amruby
here this *format.json { render :json = @cnames }* from the controller searchskill. this @cnames is a hash, so how to give each value from that @cnames using itetrate in .html() can i give anything like this... *like this $('.searchmodal').( %= @cnames .each do |doc| % +'label'+ %= doc.name

[Rails] displaying values from query result in rails

2012-06-25 Thread amruby
i have one query, which gives the correct output in query browser. *@getquery = Cname.select(cnames.name).where('skills.rate= ? AND skills.skill= ?',3,@searchstring).joins('JOIN skills ON cnames.id = skills.company_id')* * *when i print the @getquery, it gives #Cname:0x0003f511f0

Re: [Rails] displaying values from query result in rails

2012-06-25 Thread amruby
On Monday, 25 June 2012 20:51:53 UTC+5:30, Oscar Del Ben wrote: @getquery.name Thanks. that time @getquery.name gives the output *Cname* -- Oscar Del Ben Sent with Sparrow http://www.sparrowmailapp.com/?sig On Monday, June 25, 2012 at 8:15 AM, amruby wrote: i have one query

Re: [Rails] displaying values from query result in rails

2012-06-25 Thread amruby
On Monday, 25 June 2012 20:56:45 UTC+5:30, amruby wrote: On Monday, 25 June 2012 20:51:53 UTC+5:30, Oscar Del Ben wrote: @getquery.name Got the result Thanks. that time @getquery.name gives the output *Cname* -- Oscar Del Ben Sent with Sparrow http

[Rails] get loop values into controller from view

2012-06-19 Thread amruby
%= form_tag({:action = 'getrate', :controller = 'users'},{:method = :post}) do % brbr *% @eachskill.each do |loc| %* %= submit_tag loc ,:type = button, :id = loc ,:disabled =disabled, :class = btn span2 % nbsp; %= select_tag( loc,

[Rails] sending email with mail gem in rails3

2012-06-04 Thread amruby
I have used this code for sending mail, but i didn't get the mail from this *require 'rubygems'* *require 'mail'* * * * * * mail = Mail.new* * mail['from'] = 'm...@mofobi.com'* * mail[:to]= @business.email* * mail.subject = 'This is a test email'* * puts ..#{mail.to_s}* After this code

Re: [Rails] sending email with mail gem in rails3

2012-06-04 Thread amruby
04.06.2012 10:02 schrieb amruby vgrkrish...@gmail.com: I have used this code for sending mail, but i didn't get the mail from this *require 'rubygems'* *require 'mail'* * * * * * mail = Mail.new* * mail['from'] = 'm...@mofobi.com'* * mail[:to]= @business.email* * mail.subject

Re: [Rails] sending email with mail gem in rails3

2012-06-04 Thread amruby
= 'your.host.name', :user_name= 'username', :password = 'password', :authentication = 'plain', :enable_starttls_auto = true } att, 2012/6/4 amruby vgrkrish...@gmail.com On Monday, 4 June 2012 04:36:33 UTC-4, Norbert Melzer wrote: I

Re: [Rails] rails ajax issues

2012-05-29 Thread amruby
/24/jquery-ajax-with-rails-respond-to-format-dot-js/, and then update the number on your page in the success function of the ajax call. On Thu, May 24, 2012 at 4:43 PM, amruby vgrkrish...@gmail.com wrote: Hi * *I think this is my 4 or 5th post about the ajax

[Rails] rails ajax issues

2012-05-24 Thread amruby
Hi * *I think this is my 4 or 5th post about the ajax issues with my rails code. But i couldn't rectify my issues sofar. problem is, In my pages.html.erb have one text field and button. when i click on that button, the text field value will get into the controller through ajax,so after the