i m using devise for authentication purpose, for reset password its send email like bellow
Hello there,
if you would like to reset or if you have forgotten your password please click on the following link: click_here
Thank you and happy bantering!
the swagata#gmail.com Regards
i want last line looks like
regards
the swagata#gmail.com
please give me some suggestion
You can customize the devise views. Run the following command in your project directory:
rails g devise:views
This will copy devise views (including mailer templates) in your app/views/devise directory. Then you can customize as you want.
Related
TYPO3 v10.4.15
I have a custom file translate (xlf), and I'm trying to translate the BE login, a example is the next:
<trans-unit id="login.submit" resname="login.submit" approved="yes">
<source>Login</source>
<target state="final">Iniciar sesión</target>
</trans-unit>
<trans-unit id="forgot_password" resname="forgot_password" approved="yes">
<source>Forgot your password?</source>
<target>¿Olvidaste tu contraseña?</target>
</trans-unit>
The first is correct, but the second not work, someone know the id for label "Forgot your password?" or if is another cause.
The id for the label you're looking for is login.password_forget.
All labels for backend localization are located in typo3/sysext/backend/Resources/Private/Language/locallang.xlf.
Apparently you're trying to translate the TYPO3 backend to Spanish. It would be wonderful if you could contribute your translation to the official TYPO3 translation project. We're using Crowdin to manage all translations.
In the official documentation you can read more how translation works. If you need support to get started, please join the TYPO3 Slack channel #typo3-translations. If you don't have a Slack account yet, you can get one via my.typo3.org.
I am trying to use paperclip 3.5.1 with devise 3.1.0 in a Rails 4 application.
I wanted to be able to add an avatar for my User devise model, so I generated the required fields but I have problem in the showing and saving the picture.
I tried the solution given here but when I try to load a url now I get for every controller that I have the following error. It even appears for the RegistrationController.
undefined method `devise_controllers?' for #<__Some__Controller:_____>
Why does this happen and how can I solve it? I couldn't find any solutions online and since it is my first rails application I'm not so familiar with it yet.
This is just a typo: the name of the helper is :devise_controller?, notice the extra "s" you have there: rubydoc reference
I have created a contact form which will email me once sent. Now I need to be able to have the option of attaching a document that will be emailed to me also. i dont need to save it in a db as it will be with the email and downloaded from there.
Im new to rails so would like to see what other people have done in this situation, ive done some reading and see that i will need the gem paperclip in most instances? Also i have looked at jquery/paperclip in github but this seems a lot of work for what i hope is a small piece of work? I could be wrong here mind, so apologies if i am
Any help greatly appreciated
What you would have to do is use carrierwave gem or paperclip gem to upload the file to a specified folder in your public directory. I would do this using ajax that will allow you to upload the file instantly once you select the file to be sent. This would allow you to upload the attachment and have the file path known and ready so when you click submit, the following code will execute allowing you to send the file. You can also add a line of code to delete the file after it sent successfully if you don't want to accumulate files on your server. More documentation can be found here..
http://guides.rubyonrails.org/action_mailer_basics.html#sending-emails-with-attachments
class ApplicationMailer < ActionMailer::Base
def welcome(recipient)
attachments['free_book.pdf'] = File.read('path/to/file.pdf')
mail(:to => recipient, :subject => "New account information")
end
end
I have a Rails 3 app and I'm using Devise and jQTouch.
I've got all of my mobile views working except for "sign in" and "register".
When I try to sign in using the mobile version, I get the following:
Missing template user_sessions/create with {:locale=>[:en, :en], :formats=>[:mobile], :handlers=>[:rxml, :erb, :rjs, :builder, :rhtml]} in view paths
For other controllers, I added format.mobile and created mobile views, but for sign in and register I am having trouble sorting them out.
Any ideas on how to get my jQTouch mobile views working with Devise for sign in and register?
You need to do 2 things.
1) in config/initializers/devise.rb you need to add :mobile as an accepted type.
To do this find the line that says:
config.navigational_formats = [:html]
And add :mobile to it so it should now read:
config.navigational_formats = [:html, :mobile]
2) You need to create another initializer file and add the following code to it:
ActionController::Responder.class_eval do
alias :to_mobile :to_html
end
This will make it so that all devise redirects work.
If you need more information check out the devise wiki
https://github.com/plataformatec/devise/wiki
I've got Devise working on my Ruby on Rails application but viewing the user requires authentication and I don't want that. I've tried setting authenticate_user like so:
class UsersController < ApplicationController
before_filter :authenticate_user!, :except => [:show, :index]
..
end
But it still redirects to the sign_in page. Can anyone point me in the right direction?
Cheers,
Rim
PS: Please excuse my n00b-ness
Doh!
I was getting confused and had the wrong path. I been scratching my head for ages on that.
I fixed it...
I always use to copy controller files from devise gem folder to my applications controller folder
The devise controller files can be found here /usr/lib/ruby/gems/1.8/gems/devise-1.1.2/app/controllers/ (may be at different location in your case)
Copy devise folder in there and paste it to app/controllers/ and then customize registrations_controller as per your need
But I believe there must be some good solution on this. By the time you can use this.. :)