Re: [Rails] Rendering unique cached page per user in Fragment Caching

2014-12-30 Thread Ankur Kumar
:after_destroy,:sweep end Devise current_user is accessible in all the above files. -- Regards, Ankur On Tue, Dec 23, 2014 at 7:19 PM, Colin Law clan...@gmail.com wrote: On 23 December 2014 at 13:42, Ankur Kumar specialan...@gmail.com wrote: Hi, My app has devise authentication

[Rails] Rendering unique cached page per user in Fragment Caching

2014-12-23 Thread Ankur Kumar
Hi, My app has devise authentication for every user. I integrated *fragment caching* for one of my views which is accessible only on sign-in. The cached page saved by one user is accessible by another user. How can I implement a unique key based caching so that cached pages are unique for every

Re: [Rails] Build report on Ruby on Rails

2014-12-04 Thread Ankur Kumar
I have used PDFKit gem and it has worked well for me. -- Regards, Ankur Kumar www.bigbhk.com https://bigbhk.com *Lin http://in.linkedin.com/in/specialankur | Tw http://twitter.com/#%21/tweet2ankur | Fb http://www.facebook.com/specialankur* *What is BigBHK?* Watch this 2-minute video http

[Rails] Delayed Job Gem Dependency on Columnize Gem

2014-12-04 Thread Ankur Kumar
this gem earlier are here and this page doesn't talk about this dependency either. http://junkheap.net/blog/2013/05/20/elastic-beanstalk-post-deployment-scripts/ Did anyone else face this issue? Thanks. -- Regards, Ankur Kumar | +91-9739213628 www.bigbhk.com https://bigbhk.com/ *Lin http

[Rails] Reading I18n file content in rails controller

2014-11-15 Thread Ankur Kumar
Hi, Maybe this is a beginner's question. Can someone please tell me how can I reference a *en.yml* entry in my rails controller? I am able to reference it in rails view file as below. *config/locales/en.yml* read_text: I want to display this text.

[Rails] Support for Posiflex Thermal Printers in a Rails app

2014-09-09 Thread Ankur Kumar
Hi, I need to print receipts generated by my rails app on a thermal paper roll

[Rails] Whenever crontab execution failure on AWS EC2 deployment

2014-06-30 Thread Ankur Kumar
I am using whenever gem and I defined 'whenever crontab execution' command in .ebextensions folder for AWS EC2 instance. -RAILS_ROOT/.ebextensions/whenever_task.config container_commands: 20whenever_task: command: bundle exec rake whenever --update-crontab --set environment=production

[Rails] Re: Whenever crontab execution failure on AWS EC2 deployment

2014-06-30 Thread Ankur Kumar
I observed there is a typo in command, it should be : bundle exec whenever --update-crontab --set environment=production. Trying again with this command. Thanks. -- Regards, Ankur On Mon, Jun 30, 2014 at 1:35 PM, Ankur Kumar specialan...@gmail.com wrote: I am using whenever gem and I

Re: [Rails] Re: Not able to test cron job in development using Whenever gem in rails 3

2014-06-07 Thread Ankur Kumar
* Please help me with this. Thanks. -- Regards, Ankur On Fri, May 30, 2014 at 9:16 PM, Ankur Kumar specialan...@gmail.com wrote: Thanks Matt for your reply! Unfortunately, I don't see any log file in suggested locations the blog referred to: /var/log/cron, /var/log/messages and /var/log

Re: [Rails] Re: Not able to test cron job in development using Whenever gem in rails 3

2014-05-30 Thread Ankur Kumar
, Ankur Kumar specia...@gmail.com wrote: I did the following to implement cron jobs in rails 3 using a runner instead of a rake task. *Step 1:* I have whenever gem installed and scheduler.rb has following: set :environment, 'development' set :output, { :error= /log/error.log

[Rails] Re: Not able to test cron job in development using Whenever gem in rails 3

2014-05-28 Thread Ankur Kumar
Any help on this will be greatly appreciated! Thanks. -- Regards, Ankur On Wed, May 28, 2014 at 10:18 AM, Ankur Kumar specialan...@gmail.comwrote: I did the following to implement cron jobs in rails 3 using a runner instead of a rake task. *Step 1:* I have whenever gem installed

[Rails] Not able to test cron job in development using Whenever gem in rails 3

2014-05-27 Thread Ankur Kumar
I did the following to implement cron jobs in rails 3 using a runner instead of a rake task. *Step 1:* I have whenever gem installed and scheduler.rb has following: set :environment, 'development' set :output, { :error= /log/error.log, :standard = /log/cron.log } every 1.minute do

[Rails] Ticketing Gem in Rails

2014-05-22 Thread Ankur Kumar
I am looking for details about any simple ticketing gem which can do following: -Track received and sent notifications between two entities -Assign status - (open/closed/resolved) etc to these notifications -Update existing ticket status with follow up messages Can someone suggest if there are

[Rails] Devise + Switch User : How to avoid update in trackable devise columns for a switch user?

2014-05-02 Thread Ankur Kumar
I am using switch_user https://github.com/flyerhzm/switch_user rails gem to login as any other devise user from an admin account. When I use switch_user for an account, the devise session updates all the devise trackable attributes for that user such as: t.integer sign_in_count, t.datetime

[Rails] Different devise confirmation behaviour for same model

2014-04-25 Thread Ankur Kumar
Hi, I want to have different email confirmation behaviour for same model depending on certain conditions. *Case 1:* User signs up on his own using an email and password, gets Mail Template 1 (the mail only asks for email confirmation, he has already set the password) *Case 2:* A new user is

[Rails] Not able to save PDF Kit file to a Paperclip attachment in Rails 3.2.15

2014-01-30 Thread Ankur Kumar
I am trying to save a pdf file (generated using Rails PDFKit gem) to a paperclip attachment. The MySQL table entry shows following for the paperclip attachment after saving the generated PDF file: *MySQL table record:* * id | resume_type | resume_attachment_file_name |

[Rails] Re: Not able to save PDF Kit file to a Paperclip attachment in Rails 3.2.15

2014-01-30 Thread Ankur Kumar
my_model_instance = MyModel.new file = File.open(file_path) my_model_instance.attachment = file file.close my_model_instance.save! Thanks. -- Regards, Ankur On 31 January 2014 01:35, Ankur Kumar specialan...@gmail.com wrote: I am trying to save a pdf file (generated using Rails PDFKit

Re: [Rails] Simple reporting gem in rails

2014-01-13 Thread Ankur Kumar
://www.dropbox.com/mailbox for iPhone On Sun, Jan 12, 2014 at 5:19 PM, Ankur Kumar specialan...@gmail.comwrote: Hi, I need to generate few basic reports in rails (generated on the basis of some SQLs fired on MySQL) which can be viewed in HTML5 and then if a user wants, he should be able to download a pdf

[Rails] Simple reporting gem in rails

2014-01-12 Thread Ankur Kumar
Hi, I need to generate few basic reports in rails (generated on the basis of some SQLs fired on MySQL) which can be viewed in HTML5 and then if a user wants, he should be able to download a pdf file for the report. Can someone suggest a gem for this requirement? I think Rupport and Crystal

Re: [Rails] Re: Form data not uploading to sqlite database

2013-11-30 Thread Ankur Kumar
Hi Frederick, If I change the path to tasks_path, I get the following error while navigating on to the page which has this form. If I keep task_path, navigation works fine. undefined local variable or method `tasks_path' for ##Class:0xa3de690:0xb550f644 I don't see any error in development.log

[Rails] Form data not uploading to sqlite database

2013-11-29 Thread Ankur Kumar
Hi, I created a simple form using form_for and partials. When I enter a value in text field and click on add button, the data doesn't get uploaded in database table. *view/task.html.erb* %= render :partial = job_form % % for job in @jobs % %= job.name % % end % *view/_job_form.html.erb* %=

Re: [Rails] Error while using a Named Route for navigation

2013-11-26 Thread Ankur Kumar
I have fixed this issue. The 'match' statement needs to be outside the resource block in routes.rb. Rest everything remains the same. Thanks. Sent from Galaxy R, please ignore typo or brevity On Nov 27, 2013 3:41 AM, Ankur specialan...@gmail.com wrote: I have *home.html.erb* file which has a