I am not certain if anyone is still monitoring this thread since the last post that did not appear to be spam was on the 29th of October, but I hoping someone can point me in the right direction if you are still listening.
I have run into a snag when trying this example out on an app I've deployed to the Heroku platform. I am using AWS S3 as my asset host because Heroku has a read-only filesystem. I am pretty sure the problem I am having is coming from the way AWS handles assets in the cloud.
Here is the pastie: http://pastie.org/681007
In my app, instead of having an user model with an avitar attribute, I have a submissions model with a photo attribute. I am able to create a submission via the new action and upload a photograph as the paperclip attachment, but when we move create action in the submissions controller, paperclip raises NotIdentifiedByImageMagickError
It would appear that the call to Paperclip::Geometry.from_file() was expecting submissions/1/large.JPG but the url to this photo on AWS S3 is submissions/1/large.JPG?1257217300. The appended 1257217300 appears to be a cache identifier.
Does it appear that I am on the right track here? Does anyone have any suggestions for a work around?
I love using Pickle. It really speeds up writing Cucumber features and lets me focus on the real issue and not waste time on setup. Check out the Pickle readme for more detail on what this gem can do. I've also written a post that provides some more detail too: http://rubyflare.com/2009/10/28/pickle-my-cucumber/
Really useful and helpful tips about pickle, table-diffs and debugging cucumber.
Each one was just what I need to improve ^^.
So thanks Ryan and keep going ^^
HINT:
WHEN you get
Word verification response is incorrect, please try again.
THEN enable scripts for recaptcha.net to submit your comment
AS it did not show up otherwise.
First of all, thanks for the awesome screencast. I just came across this site recently and it's been an amazing resource so far.
But I'm having some trouble. I've been able to implement the search form on my model's index.html.erb file, but putting it in the application.html.erb file to act as a global search accessible from any page results in me getting whiny_nil errors all over the place.
My app is a listing of bars and their respective specials. So the search works great on the index page where all the bars are listed. I can search just fine, everything works as expected from that side of things.
But when I click a link to see additional details about the bar, THAT is when I get the whiny_nil.
I just don't know what to do or why it doesn't work. I can't seem to find anything online about implementing a global search using SearchLogic. :(
Great cast. Great site. I wake up on Mondays ready to watch another cast.
I recently needed to start using tagging in my application, so I immediately came to railscasts.com
Instead of articles, my model is entry. Companies have many entries. Entries have many tags. A tag belongs to a company. A user belongs to a company. I would like to track the tags by company by adding a company_id to the tag table. What code would I need to modify to be able to add the company_id that is a hidden field in the form?
After install in a fresh rails structure and then running
gem sources -a http://gemcutter.org/
and then
gem install formtastic
I get this error after editing my form:
undefined method `semantic_form_for' for #<ActionView::Base:0x64bf054>
The formtastic.css shows up ok and I modified the layout to include this. I've tried it with standard and nifty scaffolds. Any ideas for the error? I'm thinking it is something with the gem and my configuration. But I'm new to rails and clueless.
I've spend the whole day trying to make this work. And implementing it in my app just doesn't work.
I've tried it on a side project and no problem.
Maybe it's something from my configuration... memcached or something... I am considering everything but still without getting any errors it's damn hard to know what the problem is.
very great tutorial.It is really useful for fresher.It would be great if you add Ajax functionality with pagination.Looking forward for your reply.
I want an example with will_paginate,Ajax with out using JQuery.
Thanks for this! I was interested about formtastic since I first heard about it on RailsEnvy podcast a few weeks ago.
Any chance there's a third part planned to cover more has_many :through topics? Personally creating new records, auto complete and additional relationship fields have always trouble me.
But again, thanks for the awesome intro to formtastic!
@Jamie the CSS file included is, more than anything, a proof-of-concept. If you want labels on top, go for it, it's a few lines.
Eventually I'd like to offer both, because different situations will call for either a side-by-side layout or a labels-on-top layout. I'd be sceptical of any study that makes a claim that either approach is "always more usable".
I think someone's working on a formtastic-sass plugin too which does both styles.
@Timóteo Formtastic is built on top of Rails' built in FormBuilder, so yes, it's very much tied to forms that have models. However, it's important to point out that it will work with *any* model or class that behaves a little bit like an ActiveRecord object.
A good example of this is AuthLogic, which has a UserSession model that isn't an ActiveRecord model, but there are plenty of people that have built login forms that work with the UserSession model and Formtastic.
@DGM Formtastic there's a plugin for Formtastic that does auto complete, but IMHO, focusing on what Formtastic can't do is the wrong attitude, because you would've had to write all that code anyway. In the meantime, it's done _everything else_ for you :)
It's very easy to mix-and-match Formtastic code with custom ERB code or even make your own custom inputs (which I do all the time) to solve specific problems.
How do you automatically add new files?
Does pickle have a way to delete all records?
eg
Givin I have no xx records?
Hi everyone,
I am not certain if anyone is still monitoring this thread since the last post that did not appear to be spam was on the 29th of October, but I hoping someone can point me in the right direction if you are still listening.
I have run into a snag when trying this example out on an app I've deployed to the Heroku platform. I am using AWS S3 as my asset host because Heroku has a read-only filesystem. I am pretty sure the problem I am having is coming from the way AWS handles assets in the cloud.
Here is the pastie: http://pastie.org/681007
In my app, instead of having an user model with an avitar attribute, I have a submissions model with a photo attribute. I am able to create a submission via the new action and upload a photograph as the paperclip attachment, but when we move create action in the submissions controller, paperclip raises NotIdentifiedByImageMagickError
It would appear that the call to Paperclip::Geometry.from_file() was expecting submissions/1/large.JPG but the url to this photo on AWS S3 is submissions/1/large.JPG?1257217300. The appended 1257217300 appears to be a cache identifier.
Does it appear that I am on the right track here? Does anyone have any suggestions for a work around?
I love using Pickle. It really speeds up writing Cucumber features and lets me focus on the real issue and not waste time on setup. Check out the Pickle readme for more detail on what this gem can do. I've also written a post that provides some more detail too: http://rubyflare.com/2009/10/28/pickle-my-cucumber/
Nevermind my last comment. I seem to have missed the migration to gemcutter.
Same as Dave
After installing formtastic and altering forms:
undefined method `semantic_form_for' for #<ActionView::Base:0x64bf054>
Yes, its advanced, but you teach us during 186 episodes and that's a lot! Thanks for your work! Always a good motivation to continue studying...
Pickle looks awesome.
I recently posted a similiar Gem called "Cucumber Factory" which shares a lot of ideas with Pickle but focuses on very natural syntax.
Check it out on GitHub:
http://github.com/makandra/cucumber_factory
Have modifiers been removed from version 2 of Searchlogic? If not how do you use them, all I can find are old out-dated examples from version 1.x
I had to do this to get it working
config.gem 'ianwhite-pickle', :lib => 'pickle'
Then show me the page
Didn't know about that - thanks! Sure woulda saved me a lot of debugging time.
I think a minor correction in the code snippets is needed.
The comment for the first form should be:
<!-- views/categories/_form.html.erb -->
It is showing as views/animals/... for both form snippets.
@thibaud - did you try script/generate pickle paths ?
This adds mapping of expressions like 'the product's edit page' and even nested ones like 'the category's product's page'.
Cheers,
ian
Hi Ryan,
thnx for another great episode...
....please give us more on BDD!
greez
Thanks for the great tips in this episode - really timely (ok, stop reading our minds!).
The table reformat comes from Cucumber textmate bundle Command/Option '\'
(probably)
Thanks for the screencast.....
Yeah ditto what @Tick said. Your psychic powers are uncanny. Thanks for this and all the other extremely useful episodes.
I haven't watched it yet, but SWEET!
Good choice!
Thanks Ryan.
Great screencast Ryan! Thanks.
How did you reformat that table in textmate?
thanks for this great screencast (again!).
I'm also borred with the paths.rb file, so I have added this:
http://gist.github.com/224038
So you can write: "When I go to the products page" and it'll automagically be converted to products_page method. Great right?
I think show me the page will come in very handy... Thanks for the tip! =)
Really useful and helpful tips about pickle, table-diffs and debugging cucumber.
Each one was just what I need to improve ^^.
So thanks Ryan and keep going ^^
HINT:
WHEN you get
Word verification response is incorrect, please try again.
THEN enable scripts for recaptcha.net to submit your comment
AS it did not show up otherwise.
incredible how you manage to always present stuff that I need at that very moment.
Nevermind! I figured it out...global search form required a global variable. :)
First of all, thanks for the awesome screencast. I just came across this site recently and it's been an amazing resource so far.
But I'm having some trouble. I've been able to implement the search form on my model's index.html.erb file, but putting it in the application.html.erb file to act as a global search accessible from any page results in me getting whiny_nil errors all over the place.
My app is a listing of bars and their respective specials. So the search works great on the index page where all the bars are listed. I can search just fine, everything works as expected from that side of things.
But when I click a link to see additional details about the bar, THAT is when I get the whiny_nil.
I just don't know what to do or why it doesn't work. I can't seem to find anything online about implementing a global search using SearchLogic. :(
Nice that you added CAPTCHA to prefend spam. But now i can not help you with spam reports because of authorized error message.
Thanks for your create screencasts!
Cu
You may want to have a look at the Authlogic Generator which generates the basic code from Bens tutorial (with test coverage).
http://github.com/masone/authlogic_generator
Support for rspec and haml.
Great cast. Great site. I wake up on Mondays ready to watch another cast.
I recently needed to start using tagging in my application, so I immediately came to railscasts.com
Instead of articles, my model is entry. Companies have many entries. Entries have many tags. A tag belongs to a company. A user belongs to a company. I would like to track the tags by company by adding a company_id to the tag table. What code would I need to modify to be able to add the company_id that is a hidden field in the form?
After install in a fresh rails structure and then running
gem sources -a http://gemcutter.org/
and then
gem install formtastic
I get this error after editing my form:
undefined method `semantic_form_for' for #<ActionView::Base:0x64bf054>
The formtastic.css shows up ok and I modified the layout to include this. I've tried it with standard and nifty scaffolds. Any ideas for the error? I'm thinking it is something with the gem and my configuration. But I'm new to rails and clueless.
How to apply the same admin side, Unable to do nifty scaffolding on admin side. ruby script/generate nifty_scaffold 'admin/authors'???
Update: the latest gem would copy the formtastic.rb file to config/initializers and you don't have to create one by hand.
I've spend the whole day trying to make this work. And implementing it in my app just doesn't work.
I've tried it on a side project and no problem.
Maybe it's something from my configuration... memcached or something... I am considering everything but still without getting any errors it's damn hard to know what the problem is.
Someone else experienced similar difficulties?
Not Found
The requested URL /videos/183_gemcutter_and_jeweler.mov was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
There seems to be a problem with the podcast when subscribing from itunes.
non of the files seem to be on the server:
for example it says this file can't be found on the server, and for that matter none of them can.
http://media.railscasts.com/videos/185_formtastic_part_2.m4v
Hi! I have a very strange problem.
When I try to do this cast I end up getting with a page that loads forever and nothing in the log.
Any idea if this is caused by imagemagic or something else?
btw I updated imagemagic.
Thanks in advance!
The link doesnt seem to be working...
i get a 404 message when i try to download the video
Hi, ryan.
This screencast's link broken please check.
Thanks.
very great tutorial.It is really useful for fresher.It would be great if you add Ajax functionality with pagination.Looking forward for your reply.
I want an example with will_paginate,Ajax with out using JQuery.
I am getting
The requested URL /videos/185_formtastic_part_2.mov was not found on this server.
Looking forward to watching:)
Great one, as usual!
However, what if you have to deal with complex multi column forms?
Seems I'm getting spoiled ...
There is a way to use formtastic to handle multiple models in one form like the Ryan's Classic Recipe?
Thanks for this! I was interested about formtastic since I first heard about it on RailsEnvy podcast a few weeks ago.
Any chance there's a third part planned to cover more has_many :through topics? Personally creating new records, auto complete and additional relationship fields have always trouble me.
But again, thanks for the awesome intro to formtastic!
For anyone who uses haml/sass, you can get multiple form layouts (labels on top, left or right) for free using a simple sass sheet.
http://github.com/activestylus/formtastic-sass
Hi! Formtastic is very cool !
And good screencast (as usual!) :)
@justin:
Is there any helper like remote_form_for in Formtastic ?
Best regards,
Bruno
I also tried your project episode-182 but its giving the same error. I also installed the latest Imagemagick. But not working for me.
@Jamie the CSS file included is, more than anything, a proof-of-concept. If you want labels on top, go for it, it's a few lines.
Eventually I'd like to offer both, because different situations will call for either a side-by-side layout or a labels-on-top layout. I'd be sceptical of any study that makes a claim that either approach is "always more usable".
I think someone's working on a formtastic-sass plugin too which does both styles.
@Timóteo Formtastic is built on top of Rails' built in FormBuilder, so yes, it's very much tied to forms that have models. However, it's important to point out that it will work with *any* model or class that behaves a little bit like an ActiveRecord object.
A good example of this is AuthLogic, which has a UserSession model that isn't an ActiveRecord model, but there are plenty of people that have built login forms that work with the UserSession model and Formtastic.
@DGM Formtastic there's a plugin for Formtastic that does auto complete, but IMHO, focusing on what Formtastic can't do is the wrong attitude, because you would've had to write all that code anyway. In the meantime, it's done _everything else_ for you :)
It's very easy to mix-and-match Formtastic code with custom ERB code or even make your own custom inputs (which I do all the time) to solve specific problems.
I am running into this error code with the password confirmation.
"authlogic password confirmation is too short"
Has anyone experienced this error? I need your help.
Thanks in advance for your help.
Definitely one of the best Railscasts ever.