I have a requirement of sending notifications weekly for my site https://wikigurus.com/ where i need to send emails to many users at a time. Can this Batch API applicable to send requests for bulk emails?. Will it give any performance improvement?
First I tried in my local. I am getting below error
http://localhost:53506/mini-profiler-resources/includes.js?v=ySF6M98CBehTtL86BbiEmys9yxR1HKazhe2sznfdUWQ= 404 not found.
Two points to fix, I think.
One is that you create a new Cart object every time if it is not in the session. So imagine that your payment via PayPal fails for whatever reason you want. In this case you will finish to have multiple Cart records with purchased_at set to nil what is not ideal.
Another one is that you will assign first name and last name of the payer and display their values in the orders#new page. But what for, just to display, because the values will not be submitted with the form in OrdersController#create and will be lost when saving the order. Any tips for that ?
I followed this tutorial through but when i got to displaying users in my view, it worked for a bit and then it suddenly started throwing me this error:
and im unsure where it came from. I applied friendly_id gem to my users after this point as far as my memory takes me so im not sure if that influences this in anyway. My models and controllers match to yours too so im sure that the code on that side isnt the problem.
Below is the code updated for Rails 4.2. Note: the Rails api says that the group_by method is deprecated in Rails, but don't be confused by that, they just mean that you use the Ruby group_by method instead of the Rails' modified version (which no longer exists).
<%@task_months.each do |month, tasks| %><h2><%= month.strftime('%B') %></h2><% tasks.each do |task| %><divclass="task"><strong><%= task.name %></strong>
due on <%= task.due_at.to_date.to_s(:long) %></div><%end%><%end%>
The clearness for your writing is simply decent and i could expect you're a specialist on this subject area. Well together with your authorization permit me to grab your feed to stay upgraded with up and coming post. You can take this munnar call taxi for any tours and travels program of your family. They are providing secured and comfortable cabs. http://www.munnarcalltaxi.com
This works as is on Rails 4.2 except for the CSS. Combining other people's advice above the below works for me. Remove .pretty and add a. Change the url from the image folder to the assets folder.
I am impressed with the way you covers the whole article. Thanks for sharing and keep posting such nice information. I am truly pleased to read this website which defines our thoughts. looking more from you in future. I think you did an outstanding job ! Thanks for this!
Hey I was trying to invoke the message change for all pages so when i tried to use "/" i.e. root_path as a channel in broadcast method it didnt work but if i use any other link it works fine can some1 explain this ?
For any beginner like me, I would like to say that multiple fields and all_by dynamic finders have been removed. However single field ones are still usable.
For example:
find_by_email will work
find_all_by_gender will not work
find_last_by_status will not work
A quick reminder about older versions of Redis' default security settings... be sure to secure your Redis server from outside access. (bind to localhost and set up AUTH as default installs were accessible from the outside).
Hey, can anyone please tell me how to start workling server. I tried script/workling_starling_client start command but it keeps saying
-bash: script/workling_starling_client: No such file or directory
hi
thanks for this awesome post
i use carrierwave for uploading and i have problem to upload image and video in one uploader
i can do that separately, but when i use include CarrierWave::Video & include CarrierWave::RMagick in my uploader, video not upload and i recive this error "Failed to manipulate with rmagick, maybe it is not an image?
any idea?
I got stuck on the params.require/permit (Rails 4.2.4).
Note: my models have different fields than in the video example, but the nested permit structure for attributes should help you out. Notice how the answers_attributes is located inside the questions_attributes .
You're on the right path with fields_for and accepts_nested_attributes_for.
I did also include an example repo on GitHub for reference and to play around with. If the use case in the article doesn't match what you're looking for, be sure to let me know in the comments section and I'll try to help out, cheers!
If you need to upgrade your Rails apps to 4.2.4, you need to know how to use the activeresource gem that is now outside the Rails framework. In https://rubyplus.com/articles/2691 ActiveResource Basics using Rails 4.2.4 article, I cover the basics of getting a simple book application to talk to an inventory application using activeresource gem.
How can we extends this solution to query ActiveRecord? Trying to keep the solution DRY.
So I would like to be able to use that logic to List(index) a resource and passing the Authorization parameters to ActiveRecord which would return only the authorized resources.
Late to the party here, but I co-wrote a few thousands words about our experiences removing un-used CSS and taking our Rails app CSS codebase down from over 3000 lines to under 1000 lines.
We did things quite lo-fi, with lowly grep and meticulous workflow that involved comparing development app screens (that were in our rewritten CSS) with production app screens (written in the old CSS) and ensuring everything looked the way we wanted it.
Bobby, Daniel, did you ever figure out a solution to this? I can't get around this on the mobile web myself. If I upload more than one image file, only one of the images is uploaded multiple times.
@Boa Ho Man Did you ever figure out a solution to this? I can't get around this on the mobile web myself. If I upload more than one image file, only one of the images is uploaded multiple times.
Is this still relevant and working in the latest Rails?
After trying to make it work in my project for hours, I downloaded the source as a new project, ran db:setup and seed, and it doesn't work either (won't even load index without throwing a Nilclass error)
ActionController::Metal is basically a stripped down rendition of ActionController::Base. It's chiefly utilized for API's on account of it does exclude modules that regularly accompany a Rails controller, in this way enhancing execution.
Hi,
I have a requirement of sending notifications weekly for my site https://wikigurus.com/ where i need to send emails to many users at a time. Can this Batch API applicable to send requests for bulk emails?. Will it give any performance improvement?
Hi I am trying to add miniprofiler to mysite: https://wikigurus.com/.
First I tried in my local. I am getting below error
http://localhost:53506/mini-profiler-resources/includes.js?v=ySF6M98CBehTtL86BbiEmys9yxR1HKazhe2sznfdUWQ= 404 not found.
I also added the below code to web.config
Why it is throwing 404 error?
Two points to fix, I think.
One is that you create a new Cart object every time if it is not in the session. So imagine that your payment via PayPal fails for whatever reason you want. In this case you will finish to have multiple Cart records with
purchased_at
set to nil what is not ideal.Another one is that you will assign first name and last name of the payer and display their values in the
orders#new
page. But what for, just to display, because the values will not be submitted with the form inOrdersController#create
and will be lost when saving the order. Any tips for that ?How can I pass an additions parameter through the clickable tble column link ?
Hi Ryan, there is some problem with images no longer available in the ASCIIcast tab.
Hi Ryan,
I followed this tutorial through but when i got to displaying users in my view, it worked for a bit and then it suddenly started throwing me this error:
undefined method `profile' for #Friendship:0x007fd8519f11f0
and im unsure where it came from. I applied friendly_id gem to my users after this point as far as my memory takes me so im not sure if that influences this in anyway. My models and controllers match to yours too so im sure that the code on that side isnt the problem.
Any ideas? Thanks
Nandu.
Like the URL to this very page, I want to have urls like this:
So I use friendly_id like so:
Now, since friendly id generates the slug before the object is saved I end up with an url like so (Please note the missing id in the URL):
Now while this is not too bad as such. As soon as I save another Product called "Table Lamp", I will get an URL like this:
So my question is, how can I make sure, friendly ID creates the slug containing the ID as well.
It's like todomvc -- it's a goto app? Would you rather he do todomvc?
Below is the code updated for Rails 4.2. Note: the Rails api says that the group_by method is deprecated in Rails, but don't be confused by that, they just mean that you use the Ruby group_by method instead of the Rails' modified version (which no longer exists).
The clearness for your writing is simply decent and i could expect you're a specialist on this subject area. Well together with your authorization permit me to grab your feed to stay upgraded with up and coming post. You can take this munnar call taxi for any tours and travels program of your family. They are providing secured and comfortable cabs. http://www.munnarcalltaxi.com
Could someone please explain me how to use Faye monitoring with Private pub, I would really appreciate it, thanks
Faye monitoring
This works as is on Rails 4.2 except for the CSS. Combining other people's advice above the below works for me. Remove .pretty and add a. Change the url from the image folder to the assets folder.
You can also use Bootstrap 3 glyphicons instead of background images. Replace the helper method with this and leave out the css classes.
@Denis
Thanks for the Rails 4 updated syntax!!
Really helped me out.
I am impressed with the way you covers the whole article. Thanks for sharing and keep posting such nice information. I am truly pleased to read this website which defines our thoughts. looking more from you in future. I think you did an outstanding job ! Thanks for this!
Hey I was trying to invoke the message change for all pages so when i tried to use "/" i.e. root_path as a channel in broadcast method it didnt work but if i use any other link it works fine can some1 explain this ?
How to fix this error "Geocoding API not responding fast enough (use Geocoder.configure(:timeout => ...) to set limit)"
I have configured timeout as 20 but still I get same error.
How to fix this error "Geocoding API not responding fast enough (use Geocoder.configure(:timeout => ...) to set limit)"
For any beginner like me, I would like to say that multiple fields and all_by dynamic finders have been removed. However single field ones are still usable.
For example:
find_by_email will work
find_all_by_gender will not work
find_last_by_status will not work
A quick reminder about older versions of Redis' default security settings... be sure to secure your Redis server from outside access. (bind to localhost and set up AUTH as default installs were accessible from the outside).
See: http://redis.io/topics/security and http://antirez.com/news/96
Hey, can anyone please tell me how to start workling server. I tried script/workling_starling_client start command but it keeps saying
-bash: script/workling_starling_client: No such file or directory
I am a newbie to ROR and working on Ubuntu.
hi
thanks for this awesome post
i use carrierwave for uploading and i have problem to upload image and video in one uploader
i can do that separately, but when i use include CarrierWave::Video & include CarrierWave::RMagick in my uploader, video not upload and i recive this error "Failed to manipulate with rmagick, maybe it is not an image?
any idea?
I got stuck on the params.require/permit (Rails 4.2.4).
Note: my models have different fields than in the video example, but the nested permit structure for attributes should help you out. Notice how the answers_attributes is located inside the questions_attributes .
This is what wound up working for me
I get this error "undefined method `table' for #Prawn::Document:0x007fb57e0551a0". Anyone knows what might be going on?
to avoid the readonly error, use "reset_counters" instead of "update_attribute":
You can use this gem too
if you simply need to export data as admin to excel you can use this gem https://github.com/igorkasyanchuk/rails_db to excel or csv
Hey there @jamlevi, I recently wrote up an article about this based on your question at:
http://ducktypelabs.com/how-to-use-has_many-through-with-additional-attributes-on-the-join-table/
You're on the right path with
fields_for
andaccepts_nested_attributes_for
.I did also include an example repo on GitHub for reference and to play around with. If the use case in the article doesn't match what you're looking for, be sure to let me know in the comments section and I'll try to help out, cheers!
Sid
If you need to upgrade your Rails apps to 4.2.4, you need to know how to use the activeresource gem that is now outside the Rails framework. In https://rubyplus.com/articles/2691 ActiveResource Basics using Rails 4.2.4 article, I cover the basics of getting a simple book application to talk to an inventory application using activeresource gem.
Very useful stuff, had problem with deploy.rb for a while, finally found the solution.
https://www.rebelmouse.com/energysolutions/the-use-of-depleted-uranium-1416882594.html
This gem may be helpful, pretty useful julia_builder
How can we extends this solution to query ActiveRecord? Trying to keep the solution DRY.
So I would like to be able to use that logic to List(index) a resource and passing the Authorization parameters to ActiveRecord which would return only the authorized resources.
Cheers,
Can Anyone help.
I am having an issue to use this in rails 4 app.
Did you find any solution on this issue? I am using 4.2.1 and have same error. I am using angularjs-rails gem but no luck.
In your ascii cast I believe there is a typo
jQuery ->;
$('#faqs').sortable();
should be
jQuery ->
$('#faqs').sortable();
There is an extra semicolon that was breaking my code.
Late to the party here, but I co-wrote a few thousands words about our experiences removing un-used CSS and taking our Rails app CSS codebase down from over 3000 lines to under 1000 lines.
We did things quite lo-fi, with lowly grep and meticulous workflow that involved comparing development app screens (that were in our rewritten CSS) with production app screens (written in the old CSS) and ensuring everything looked the way we wanted it.
https://www.oxbridgenotes.com/articles/css_refactoring_from_append_only_to_modular_css
Bobby, Daniel, did you ever figure out a solution to this? I can't get around this on the mobile web myself. If I upload more than one image file, only one of the images is uploaded multiple times.
@Boa Ho Man Did you ever figure out a solution to this? I can't get around this on the mobile web myself. If I upload more than one image file, only one of the images is uploaded multiple times.
Hi there,
Trying to get a spinner on the submit button rather than just disabling it. Usually I just do it with:
<%= button_tag "Submit", class: 'mb-xs mt-xs mr-xs btn btn-primary btn-block', data: {disable_with: " Wait..."} %>
But this doesnt seem to work. Any ideas?
Thanks
hi folks, I am getting an: "uninitialized constant QuoteController::Prawn" error.
at the following line (with the code in the relevant controller):
anybody have any ideas? It's giving me grief!
Code is upgraded to Rails 4.2.4 and latest draper version : https://github.com/bparanj/draper
in Rails 4.2 this code gives me error
undefined method `reject' for nil:NilClass
product.update_attributes!(params[:product_params].reject { |k,v| v.blank? })
Are you referring to the commercial NGINX Plus offering? The open source NGINX is always free as in free beer
Looks like NGINX is no longer free. Anyone know of any other options?
How I can do this for Active Admin??
same here
This also works:
self.category = Category.find_or_create_by(name: name) if name.present?
yes, indeed.
Is this still relevant and working in the latest Rails?
After trying to make it work in my project for hours, I downloaded the source as a new project, ran db:setup and seed, and it doesn't work either (won't even load index without throwing a Nilclass error)
ActionController::Metal is basically a stripped down rendition of ActionController::Base. It's chiefly utilized for API's on account of it does exclude modules that regularly accompany a Rails controller, in this way enhancing execution.
ref: http://laustan.com/
For quick login into system:
https://github.com/igorkasyanchuk/any_login
Support Authlogic and other auth gems.
Please give it a try!
Please check my gem https://github.com/igorkasyanchuk/any_login
It can really make your life easier with changing logged in user.
Your feedback is appreciated.
Video: https://www.youtube.com/watch?v=978DlHvufSY&feature=youtu.be
PS: this is my first solid gem :) and I hope you will like it.