26 Dec '12, 2am

deviseでsoft deleteする手段。 / “ruby on rails - How to "soft delete" user with Devise - Stack Overflow”

I could advise overriding destroy method on your User model to simply do update_attribute(:deleted_at, Time.current) (instead of actually destroying), but this deviation from standard API could become burdensome in the future, so here's how to modify the controller. Devise has a bunch of default controllers out of the box. The best way to customize them is to create your own controller inheriting the corresponding devise controller. In this case we are talking about Devise::RegistrationsController — which is easily recognized by looking at source. So create a new controller. class RegistrationsController < Devise::RegistrationsController end Now we have our own controller fully inheriting all the devise-provided logic. Next step is to tell devise to use it instead of the default one. In your routes you have devise_for line. It should be changed to include registrations con...

Full article: http://stackoverflow.com/questions/5140643/how-to-soft-de...

Tweets

Adding html tag in ruby on rails controller: Ho...

stackoverflow.com 26 Dec '12, 10am

How do I add html tag in ruby on rails controller? I want to add this statement include a_tag in ruby on rails controller....

Ruby on Rails Console with Associations

stackoverflow.com 26 Dec '12, 12am

Rails ActiveRecord associations inconsistently updated has_many, belongs_to association where has_many associated model ha...

Applicability of ruby on rails for a video heav...

stackoverflow.com 26 Dec '12, 1pm

I intend to develop a web application that will have most of the features like facebook and youtube have, for instance - a...

ruby on rails 3 - timesheet in rails3 - Stack O...

stackoverflow.com 28 Dec '12, 12pm

<tr id="row<%= index %>" valign="top" class ='time_stamp'> <%= hidden_field_tag "timesheet[timesheet_line_items_attributes...

Ruby on Rails 3: Sign-In With devise and cancan

stackoverflow.com 01 Jan '13, 1pm

rspec test fail - user sign out - Ruby on Rails 3 Tutorial book Chap 9 Ruby on rails mysql problem CanCan, Devise, Rails a...

Create a has_many association where a condition...

stackoverflow.com 26 Dec '12, 5pm

Soliciting Rails Association Feedback + Questions from a Noob How can I create, associate, and de-associate related record...

Ruby on Rails engineer (+Opportunity to attend ...

careers.stackoverflow.com 26 Dec '12, 6pm

Are you a solid Ruby on Rails engineer looking for a unique FT opportunity in a highly experienced, creative, and purposef...