If anyone's interested, I refactored Ryan's (always-awesome) approach to support editing/updating records, keep the code out of the controller, and fix a few issues. http://github.com/nerdcave/rails-multistep-form
This works too. Even validates on the reset password form and ask for confirmation if the password changes on the profile. But, it has a problem. if I submit the reset password form without any value for the password or password_confirmation it won't validate the presence of :password or :password_confirmation. The password won't be updated but it'll be nice to show the validation errors for presence in this scenario.
I don't know if any one has this issue, but I would appreciate some light here.
I'm interested in #3, model caching + fragment caching. Why would you need to use both? I just saw the model caching video, and it looks like it solves almost all the caching problems to me, tradeoff being more memory for memcache. Can you give me an example of how you're using both model/fragment caching?
Working with a group of developers we had some issues after doing git pull on our local machines. Just wondering if we missed something in our .gitignore to make the workflow easier?
Thanks!
hello all. I tried to use sorcery with backbone.js. I have written API in rails but I guess I have to add the before_filter :require_login in controllers that are part of the API. The problem is that I get an error
> WARNING: Can not Verify CSRF token authenticity
> Redirected to http://localhost:3000/
> Filter chain halted as: require_login rendered or redirected
> Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
Miniprofiler is showing many queries selecting from pg_attribute and pg_class. These queries are not in the development log. 14 of the 20 queries on one of my pages are these pg queries. Do these queries have to be run? If not how can I prevent them from running?
I reloaded my page and it seems these are not run again, so it must be some kind of 'first time the server loads' type queries.
If anyone is looking to use Bootstrap datepicker with best_in_place, I've forked best_in_place and turned the datepicker call into an event. Bootstrap support comes built in.
If the pull request is accepted it will be a part of best_in_place.
I tried adding this method for adding grandchildren but I get the error: undefined method 'klass' for nil:NilClass passing in :image as the child_association. Could you possible post your form code?
trying to find user friends who are using my app using koala gem but I am facing these issue and I didnot find any solution for it
Koala::Facebook::AuthenticationError in Reg_steps#show
type: OAuthException, code: 190, error_subcode: 460, message: Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons. [HTTP 400]
Thanks for this! Not understanding how exactly this worked, I wasn't able to get your code to work in my app. I found this post to be helpful. Any comments on it in terms of simplicity and/or limitations?
or you can modify your environment config to not mangle the variables when minimizing. I modified the code to "do the right thing" and worked fine for me on Heroku. Happy to help.
Has anyone seen or created a solid example of using delete? Or even better, batch delete? Say I want to clear all entries in the example...I'm trying to use a simple call to a $scope.clearEntries function in my raffle.js.coffee file but doesn't seem to work.
Great kick off for Angular as always though, Ryan. Thanks again.
Is there a way to display a text field when a checkbox is checked? Say you want to add more info about that product in the join model. You check "Board Game" and you want to comment that "Settlers of Catan is a great Board Game for ages 5 - Adult" (or something like that). You also check "Toys & Games" and want to add "A Great Christmas Gift". This would update a field in the join model table called "Comments". The data in the join model would now be
ID 1
product_id 1
category_id 1
comment "Settlers of Catan..."
ID 2
product_id 1
category_id 6
comment "A Great Christmas ..."
My question is, how do you store extra info in the join model and extract that out later?
You always seem to release just the right episode for the problem I'm trying to solve. Thanks for all the help over the years!
Thanks, was looking back & forth
Does any one know, How can I remove progress bar after uploading the file?
http://brainspec.com/blog/2012/07/09/activerecord-inheritance-contexts/
What do you think about using this technique?
even I am seeing the same problem.
If anyone's interested, I refactored Ryan's (always-awesome) approach to support editing/updating records, keep the code out of the controller, and fix a few issues. http://github.com/nerdcave/rails-multistep-form
This validation subject is getting complex...
Let's say I validate like this:
and I use the tip above:
This works perfectly. But If I don't want the user to confirm the password every time he saves the profile I would do like this.
This works too. Even validates on the reset password form and ask for confirmation if the password changes on the profile. But, it has a problem. if I submit the reset password form without any value for the password or password_confirmation it won't validate the presence of :password or :password_confirmation. The password won't be updated but it'll be nice to show the validation errors for presence in this scenario.
I don't know if any one has this issue, but I would appreciate some light here.
Thanks
use http caching: http://railscasts.com/episodes/321-http-caching
or page caching.
I'm interested in #3, model caching + fragment caching. Why would you need to use both? I just saw the model caching video, and it looks like it solves almost all the caching problems to me, tradeoff being more memory for memcache. Can you give me an example of how you're using both model/fragment caching?
is cache_digests more efficient?
ugh? this also generates a key for the models nuh?
Hi great tutorial .. but have a problem with checkboxes nothing append when i'am updating??
some body has the same probleme?
Thank you very much John! that really works.
Yes, you could do something like this:
And then open the submenu with, let's say jQuery:
Working with a group of developers we had some issues after doing git pull on our local machines. Just wondering if we missed something in our .gitignore to make the workflow easier?
Thanks!
hello all. I tried to use sorcery with backbone.js. I have written API in rails but I guess I have to add the before_filter :require_login in controllers that are part of the API. The problem is that I get an error
> WARNING: Can not Verify CSRF token authenticity
> Redirected to http://localhost:3000/
> Filter chain halted as: require_login rendered or redirected
> Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
How do you use this plugin with SimpleForm?
Awesome episode. Is there any way to hide the child and when click on the parents show them? I can use a Javascript for that?
I have the following setup
Rails 3.2.12
when I type 'f', nothing gets populated. Any ideas?
I have javascript enabled on my browser.
Thanks for posting this, Ryan should really update or add an addendum.
see :
- http://stackoverflow.com/questions/12540865/error-with-rails-test-database-using-postgres-using-hstore
- http://blog.remarkablelabs.com/2012/12/a-love-affair-with-postgresql-rails-4-countdown-to-2013
Try the @Jeremy solution:
http://gist.github.com/308804
The 406 occurs when you don't set the
respond_to
for the given format on controller.Try to reload your server.
+1
I got this figured out and posted the answer here: http://stackoverflow.com/questions/16839555/rails-cast-196-197-nested-model-generation/16867048#16867048
Miniprofiler is showing many queries selecting from pg_attribute and pg_class. These queries are not in the development log. 14 of the 20 queries on one of my pages are these pg queries. Do these queries have to be run? If not how can I prevent them from running?
I reloaded my page and it seems these are not run again, so it must be some kind of 'first time the server loads' type queries.
Hi guys,
My "message" is a nested resource and when trying to implement the nesting for message I am getting the following error. Any clues?
Missing partial messages/message with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "C:/Sites/final/cloud/app/views"
am interested tooo
Yep, solved my problem. Thanks!
I'm wondering how can I load a SelectBox using a restful resource.
However it does work, I'm not sure if I have to load the content to the controller first, because I have the route in this way.
Any Ideas?
If anyone is looking to use Bootstrap datepicker with best_in_place, I've forked best_in_place and turned the datepicker call into an event. Bootstrap support comes built in.
If the pull request is accepted it will be a part of best_in_place.
https://github.com/straydogstudio/best_in_place
Check this out http://stackoverflow.com/questions/14056007/oh-my-zsh-themes-dont-show-properly-background-stays-white
have you solved this? I have the same problem with Korean language.
I tried adding this method for adding grandchildren but I get the error:
undefined method 'klass' for nil:NilClass
passing in:image
as the child_association. Could you possible post your form code?+1 for all three of these!
trying to find user friends who are using my app using koala gem but I am facing these issue and I didnot find any solution for it
Koala::Facebook::AuthenticationError in Reg_steps#show
type: OAuthException, code: 190, error_subcode: 460, message: Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons. [HTTP 400]
Thanks for this! Not understanding how exactly this worked, I wasn't able to get your code to work in my app. I found this post to be helpful. Any comments on it in terms of simplicity and/or limitations?
or you can modify your environment config to not mangle the variables when minimizing. I modified the code to "do the right thing" and worked fine for me on Heroku. Happy to help.
Has anyone seen or created a solid example of using delete? Or even better, batch delete? Say I want to clear all entries in the example...I'm trying to use a simple call to a $scope.clearEntries function in my raffle.js.coffee file but doesn't seem to work.
Great kick off for Angular as always though, Ryan. Thanks again.
Valkyrie looks interesting. I'm using rbenv, installing the gem, how do you get it to work from the command line as in the example?
Ryan, you are an outstanding teacher. 1000+1 thanks for your railscasts.
alonzorz... have you resolved this? I am running into the same problem.
Hi @dedek, you code looks ok to me. Just make sure you are actually instantiating a
task
in your controller, something like thisGood luck!
I second this
yes, after you insert a new field, find the select element and call chosen on it.
In my case it was like this:
this is my association:
I add the class chzn-select which is used to find the element.
Is there a way to display a text field when a checkbox is checked? Say you want to add more info about that product in the join model. You check "Board Game" and you want to comment that "Settlers of Catan is a great Board Game for ages 5 - Adult" (or something like that). You also check "Toys & Games" and want to add "A Great Christmas Gift". This would update a field in the join model table called "Comments". The data in the join model would now be
ID 1
product_id 1
category_id 1
comment "Settlers of Catan..."
ID 2
product_id 1
category_id 6
comment "A Great Christmas ..."
My question is, how do you store extra info in the join model and extract that out later?
Thanks.
+1 for follow up. Baa.
Simple direct File Upload to Amazon S3 using Javascript, jQuery, Amazon S3 CORS support, Simple Form with progress bar. Designed by me in Silicon Valley and developed by Denny: https://github.com/dennybritz or https://github.com/bparanj/s3-cors-upload-rails. Enjoy.
I'm having trouble with binding of caller. I can't start the rails server (or guard) with it installed. Any ideas on what to do about this error?
dyld: lazy symbol binding failed: Symbol not found: _RUBY_FREE_ENTER
Referenced from: .../.rvm/gems/ruby-1.9.3-p429/gems/binding_of_caller-0.7.1/lib/binding_of_caller.bundle
Expected in: flat namespace
dyld: Symbol not found: _RUBY_FREE_ENTER
Referenced from: .../.rvm/gems/ruby-1.9.3-p429/gems/binding_of_caller-0.7.1/lib/binding_of_caller.bundle
Expected in: flat namespace
Trace/BPT trap