Hi,
I know this ones a dumb question. I wanna create a blog and store the
article in DB. it can be HUGE text.
Can someone please mention the data type in rails and its equivalent
in my sql is generally used?
Hi,
I know this ones a dumb question. I wanna create a blog and store the
article in DB. it can be HUGE text.
Can someone please mention the data type in rails and its equivalent
in my sql is generally used?
On Jul 27, 1:28 pm, Ritvvij [email protected] wrote:
Hi,
I know this ones a dumb question. I wanna create a blog and store the
article in DB. it can be HUGE text.Can someone please mention the data type in rails and its equivalent
in my sql is generally used?
You want a text column
Fred
yes… text area to write the article and then save the whole article
in DB
not sure which datatype to use
On Jul 27, 12:41 pm, Frederick C. [email protected]
On Jul 27, 1:46 pm, Ritvvij [email protected] wrote:
yes… text area to write the article and then save the whole article
in DB
You didn’t quite understand me. The column type you want (at least in
mysql, sqlite3, postgresql etc) is called text
Fred
Frederick C. wrote:
On Jul 27, 1:46�pm, Ritvvij [email protected] wrote:
yes… text area to write the article and then save the whole article
in DBYou didn’t quite understand me. The column type you want (at least in
mysql, sqlite3, postgresql etc) is called textFred
Also, as I understand it the migration t.text (or t.column :text) will
map to an appropriate column type for the database being used (i.e. for
Oracle the column would be clob).
Frederick C. wrote:On Jul 27, 1:46�pm, Ritvvij <[email protected]> wrote:yes... text area to write the article and then save the whole article in DBYou didn't quite understand me. The column type you want (at least in mysql, sqlite3, postgresql etc) is called textFred
Also, as I understand it the migration t.text (or t.column :text) will map to an appropriate column type for the database being used (i.e. for Oracle the column would be clob).
You could count the number of lines like this:
lines = filed_name.split("\n").size
If I’m understanding what you are asking about.
Carl
You could count the number of lines like this:lines = filed_name.split(“\n”).size
If I’m understanding what you are asking about.
Carl
On Jul 27, 12:54 pm, Fabian <[email protected]> wrote:
talking about text fields.... I have a text area of 30 columns in my html viewer of a text field It works fine, for all CRUD operations. The only detail is about te text don,t include any controls ("\n" or "\l\n") for the lines was auto-breaked into the text area of the form. I want to count the number of lines of this text area, but my code fails because I am counting "\n" marks. I know this looks like an "HTML" issue (not Rails) but all suggestions will be appreciated. Thanks in advance FF Robert W. escribió:Frederick C. wrote:On Jul 27, 1:46 pm, Ritvvij<[email protected]>wrote:yes... text area to write the article and then save the whole article in DBYou didn't quite understand me. The column type you want (at least in mysql, sqlite3, postgresql etc) is called text FredAlso, as I understand it the migration t.text (or t.column :text) will map to an appropriate column type for the database being used (i.e. for Oracle the column would be clob).
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs