Alternatives to Rails' client_side_validations? - ruby-on-rails

client_side_validations was a widely used gem that automatically created realtime validations for your Rails' frontend based on your models' validations. Alas, it seems to be unmaintained now. Are there any similar, maintained alternatives out there?

You can use Judge Rails Gem: https://github.com/joecorcoran/judge and there are plugins to use with FormBuilder SimpleForm https://github.com/joecorcoran/judge-simple_form

parsley.js is really nice -http://parsleyjs.org/ and it's been made into a gem for rails here - https://github.com/mekishizufu/parsley-rails

You can also use jQuery.validation. Although I think parsley looks a little better.

Related

What gem can I use to handle state transitions in Rails 5?

What gem can I use to handle state transitions in rails 5? I think gems like workflow and state_machine are not compatible with Rails 5. Can you recommend with other gems? Thank you!
Though this is an opinion-oriented question, I suggest to use AASM. It is full of great features, works seemlessly with databases, have support to define callbacks for the transitions.
You can try gem state machine activerecord its supported with rails5.

What's the state of the art gem/plugin for tags?

I'm redesigning my site currently and replacing all the old plugins. For tags I use acts_as_taggable_on_steroids and I'm wondering if there are any newer/better gems for Rails 3.
You'll want to use the similarly named acts-as-taggable-on instead. Better support, and the code originated from that gem you mentioned.
It's pretty good and feature rich AND easy enough to use.

jnunemaker-validatable - internationalization option?

I am using the jnunemaker-validatable gem by way of mongomapper, and it seems that the error messages are not coming through mapped to the standard keys used in Activerecord's i18n file. I'm not 100% sure that jnunemaker-validatable is the issue here, just seems a likely candidate. Has anyone used this gem in a multi-lingual way with success?
Thanks,
Tom
Found the answer here:
http://groups.google.com/group/mongomapper/browse_thread/thread/ab1a99f472d51847
Short answer appears to be that it's not a feature at this time, but there are various workarounds to get you part of the way there, and a Gem that looks promising: https://github.com/jmonteiro/mongomapper_i18n

RAILS: Authlogic gem & Userstamp plugin

I have an application that uses the Authlogic gem and needs the functionality
of the Userstamp plugin.
AFAIK Userstamp works very well with RestfulAuthentication, though I couldn't find anything mentioning using it together with Authlogic.
Has anyone of you tried to combine them? Are there issues I should be aware of? Should I use a completely different plugin/gem to get the functionality of Userstamp in combination with Authlogic?
Thanks a lot for your help!
Well, I just found it out the hard way. ;-)
If you use Authlogic (2.0.11) in combination with Userstamp (2.0) make sure that Authlogic's current_user method in the ActionController is protected and not private (as is the default). Or you'll get a NoMethodError in User sessionsController#new.
Besides that it just works like a charm.
P.S.: There's no need to manually implement the set_stamper method in the ActionController. Authlogic and Userstamp work well with the method defined by the Userstamp plugin. If you've no idea what I'm talking about, just ignore this. :-)

Acts_as_paranoid, is_paranoid... Alternatives?

I'm looking for a rails plugin/gem which brings the functionality of marking an ActiveRecord-Model deleted, instead of deleteing it.
Does anybody know, what gems or plugins are up to date? (AAP is out-dated and is_paranoid doesn't appear to be used by the community).
Do you know alternatives?
It seems even the authors of both acts_as_paranoid and is_paranoid aren't using their respective plugins/gems any more. Both are using named scopes.
Yeah, it's not automagic or anything, but sometimes being explicit about your intentions is a good thing.
For completeness, here is a more recent gem for this purpose:
Paranoia - acts_as_paranoid for Rails 3
https://github.com/radar/paranoia
And another:
https://github.com/JackDanger/permanent_records
is_paranoid doesn't appear to be used by the community..
http://chadfowler.com/blog/2009/07/08/how-ruby-mixins-work-with-inheritance/ - Just a blog post the other day talking about it. Seems like it solved Chad's problem just fine (as well as lead him to write a post about inheritance and mixins).
How about you just have a valid:boolean column/attribute and set it to false when you wish to soft-delete the model? Or am I missing something?

Resources