Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

before_validation to generate permalink if nil not working #14

Open
fddayan opened this issue Jun 14, 2013 · 1 comment
Open

before_validation to generate permalink if nil not working #14

fddayan opened this issue Jun 14, 2013 · 1 comment

Comments

@fddayan
Copy link

fddayan commented Jun 14, 2013

If my title has content and my permalink field is nil.. it does not generate the permalink.

I try from the console many things and it just does not work

ruby 1.9.2
rails 3.2.3

if I do this to my model it works

 before_validation do |record|
    record.generate_permalink! if record.permalink.blank?
 end
@olkarls
Copy link
Owner

olkarls commented Jun 17, 2013

Hi Fddayan!

Can you please post the full model code?

Thanks
/ Ola

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants