rails3 Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Lately, I was working on a project where I found an issue that emails sent using ActionMailer were not applying css styles to the html elements of the email. On adding style tag in the email view files, I was able to view stylings on thunderbird mail and ymail but still I was unable to view css stylings for emails in gmail. On furthur investigating the issue, I found that gmail requires inline stylings to be applied to the email templates. I found some gems which could fix this problem by converting external css to inline css. I tried the
What is Mass Assignment? Assigning multiple attributes of a record with params received from the application within a single query. For example,{:user => {:first_name => "FirstName", :last_name => "LastName", :role => "admin"}} So while creating a new record in User table, we specify as => User.create(params[:user]) In the above query, rails gives the freedom for one-to-one mapping of params attributes with model-record attributes. Lets say, we don't explicitly specify as User.create(:first_name => params[:user][:first_name], :last_name => params[:user][:last_name].......). Such assignments