Hi... i used paulca-phone_codes plugin for country code.and it works. <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%> what i want to know is how to apply css class for this.when i tried like below it doesnot work <%= f.select :country_code, PhoneCode.options_for_select(:prefix), {:class => "mystyle" }%> Any helps -- Posted via http://www.ruby-forum.com/.
Did u try stylesheet_link_tag("mystyle") and put mystyle.css inside public/stylesheets ? On Jun 23, 11:10 am, Newb Newb <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi... > i used paulca-phone_codes plugin for country code.and it works. > <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%> > what i want to know is how to apply css class for this.when i tried like > below it doesnot work > <%= f.select :country_code, PhoneCode.options_for_select(:prefix), > {:class => "mystyle" }%> > > Any helps > -- > Posted viahttp://www.ruby-forum.com/.
Newb Newb wrote:> Hi... > i used paulca-phone_codes plugin for country code.and it works. > <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%> > what i want to know is how to apply css class for this.when i tried like > below it doesnot work > <%= f.select :country_code, PhoneCode.options_for_select(:prefix), > {:class => "mystyle" }%> > > Any helpstry <%= f.select :country_code, PhoneCode.options_for_select(:prefix), :style => "class=''MyStyle'' %> You can even substitute all of the properties separated by semicolons (;) within the :style => "" parameter. -- Posted via http://www.ruby-forum.com/.
Ahad Amdani wrote:> Newb Newb wrote: >> Hi... >> i used paulca-phone_codes plugin for country code.and it works. >> <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%> >> what i want to know is how to apply css class for this.when i tried like >> below it doesnot work >> <%= f.select :country_code, PhoneCode.options_for_select(:prefix), >> {:class => "mystyle" }%> >> >> Any helps > > try > > <%= f.select :country_code, PhoneCode.options_for_select(:prefix), > :style => "class=''MyStyle'' %> > > You can even substitute all of the properties separated by semicolons > (;) within the :style => "" parameter.mine why didnt work ? <%= post.body, :style => "class=''body_text''" %> -- Posted via http://www.ruby-forum.com/.
<%= post.body, :class=> "body_text" %> On Aug 10, 11:40 am, Philip Gavrilos <rails-mailing-l...@andreas- s.net> wrote:> Ahad Amdani wrote: > > Newb Newb wrote: > >> Hi... > >> i used paulca-phone_codes plugin for country code.and it works. > >> <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%> > >> what i want to know is how to apply css class for this.when i tried like > >> below it doesnot work > >> <%= f.select :country_code, PhoneCode.options_for_select(:prefix), > >> {:class => "mystyle" }%> > > >> Any helps > > > try > > > <%= f.select :country_code, PhoneCode.options_for_select(:prefix), > > :style => "class=''MyStyle'' %> > > > You can even substitute all of the properties separated by semicolons > > (;) within the :style => "" parameter. > > mine why didnt work ? > > <%= post.body, :style => "class=''body_text''" %> > -- > Posted viahttp://www.ruby-forum.com/.
John Yerhot wrote:> <%= post.body, :class=> "body_text" %> > > On Aug 10, 11:40�am, Philip Gavrilos <rails-mailing-l...@andreas-I have been tried this but dint work :/ error: SyntaxError in Posts#show compile error /Users/webstic/Sites/weblog2/app/views/posts/_post.html.erb:6: syntax error, unexpected tASSOC, expecting tCOLON2 or ''['' or ''.'' ...r.concat(( post.body, :class=> "body_text" ).to_s); @output_... ^ -- Posted via http://www.ruby-forum.com/.
On Jun 23, 7:10 am, Newb Newb <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi... > i used paulca-phone_codes plugin for country code.and it works. > <%= f.select :country_code, PhoneCode.options_for_select(:prefix)%> > what i want to know is how to apply css class for this.when i tried like > below it doesnot work > <%= f.select :country_code, PhoneCode.options_for_select(:prefix), > {:class => "mystyle" }%> >Because select takes two hashes of options. The first is for options for select itself, the second is for html options. You''re sticking your html options in the first hash. Fred> Any helps > -- > Posted viahttp://www.ruby-forum.com/.
Philip Gavrilos wrote:> John Yerhot wrote: >> <%= post.body, :class=> "body_text" %> >> >> On Aug 10, 11:40�am, Philip Gavrilos <rails-mailing-l...@andreas- > > > I have been tried this but dint work :/ > > error: SyntaxError in Posts#showRemove the comma. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser wrote:> Philip Gavrilos wrote: >> John Yerhot wrote: >>> <%= post.body, :class=> "body_text" %> >>> >>> On Aug 10, 11:40�am, Philip Gavrilos <rails-mailing-l...@andreas- >> >> >> I have been tried this but dint work :/ >> >> error: SyntaxError in Posts#show > > Remove the comma. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.orgwhen i remove the comma im getting this: ArgumentError in Posts#show Showing app/views/posts/_post.html.erb where line #6 raised: wrong number of arguments (1 for 0) 6: <%= post.body :class => "body_text" %><br /> -- Posted via http://www.ruby-forum.com/.
Philip Gavrilos wrote:> Marnen Laibow-Koser wrote: >> Philip Gavrilos wrote: >>> John Yerhot wrote: >>>> <%= post.body, :class=> "body_text" %> >>>> >>>> On Aug 10, 11:40�am, Philip Gavrilos <rails-mailing-l...@andreas- >>> >>> >>> I have been tried this but dint work :/ >>> >>> error: SyntaxError in Posts#show >> >> Remove the comma. >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > > when i remove the comma im getting this:Yeah, sorry, that was a mistake on my part. You will probably have to wrap post.body in a div or span to specify the appropriate class. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.