[Rails] Change field value

2015-11-16 Thread Euan Leslie
Hi I want to change the value of a field when another field is updated. Specifically, I want my e mail field to get it's data from the username, the domain always being the same, so username is say johndoe, e mail address will be john...@wherever.com my fields look like this: Username:

[Rails] Re: Re: Show in text box

2015-06-09 Thread Euan Leslie
Colin Law wrote in post #1174741: On 8 June 2015 at 17:02, Euan Leslie li...@ruby-forum.com wrote: ... I've found another problem with this. It produces an error if there are no records in the table. The line in my Index view: %= render partial: 'news/news', locals: { news: News.last

[Rails] Re: Show in text box

2015-06-08 Thread Euan Leslie
Euan Leslie wrote in post #1174549: This could possibly be a really stupid question, but I have a home page which calls a partial to show the latest entry in a table called 'news'. All I want to know is how to put the 'news.content' into a text box. Partial is as follows: p strongTitle

[Rails] Re: Re: Show in text box

2015-06-04 Thread Euan Leslie
Colin Law wrote in post #1174557: On 4 June 2015 at 11:32, Euan Leslie li...@ruby-forum.com wrote: Yes, it works, I just think it would stand out better if it was enclosed in a text box that's all. Is there a way? Please remember to quote the previous post when replying, otherwise no-one

[Rails] Re: Show in text box

2015-06-04 Thread Euan Leslie
Yes, it works, I just think it would stand out better if it was enclosed in a text box that's all. Is there a way? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group

[Rails] Show in text box

2015-06-04 Thread Euan Leslie
This could possibly be a really stupid question, but I have a home page which calls a partial to show the latest entry in a table called 'news'. All I want to know is how to put the 'news.content' into a text box. Partial is as follows: p strongTitle:/strong %= news.title % /p p

[Rails] Automatic email from Rails form

2015-06-03 Thread Euan Leslie
I could have sworn I posted this yesterday but can't find it anywhere Anyway, I am trying to get my Rails form to post an e mail to a Manager when someone hits the 'Submit' button of my leave request form (model is 'absence'). The Manager e mail is in a field called 'mgremail' (string). Other

[Rails] Re: Automatic email from Rails form

2015-06-03 Thread Euan Leslie
Colin Law wrote in post #1174468: On 3 June 2015 at 09:50, Euan Leslie li...@ruby-forum.com wrote: Anyway, I am trying to get my Rails form to post an e mail to a Manager when someone hits the 'Submit' button of my leave request form (model is 'absence'). Did you see this? http