I have Model with 2 attributes.
attr_accessible :app_url, :entity_name
And I am passing :app_url object value like this “www.aaronsw.com/feeds/pgessays.rss” from View.
Using before_create method in Model. The entity_name should be like this “www.aaronsw.com” (have to extract the domain name from app_url attribute)
Solution Please
You should use ruby URI: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI.html
It has all that you need to accomplish your task.