[Rails] Re: Re: How to send XML Data to Database in Rails

2010-11-15 Thread Matt Royer
of the ideas so far have been great. I'll post back with any more issues, and if people could keep the suggestions flowing, I would be forever grateful! Thanks, --Matt Royer -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Googl

[Rails] Re: How to send XML Data to Database in Rails

2010-11-15 Thread Matt Royer
Marnen Laibow-Koser wrote in post #961590: > Another idea: if this is to be read-only, you could use the XML files > themselves as the DB, either through ActiveModel or (probably better) > something like eXistDB. That would be awesome! Any links on where to go to figure out how to do that? I'll l

[Rails] Re: How to send XML Data to Database in Rails

2010-11-15 Thread Matt Royer
t have the same confidence in myself. There's a lot I don't know about Ruby and Rails, and I'm still trying to learn. I can create a database in Rails. I know how to do that. But I don't know how to get this text from the xml files turned into objects to send to the

[Rails] How to send XML Data to Database in Rails

2010-11-15 Thread Matt Royer
es describing what I need (I've googled this subject extensively), or any hints, tips, etc... -- would be GREATLY appreciated. Thanks in advance, --Matt Royer Attachments: http://www.ruby-forum.com/attachment/5391/noko-ono.rb -- Posted via http://www.ruby-forum.com/. -- You received thi

[Rails] Re: Help on formatting some HAML

2010-09-07 Thread Matt Royer
Marnen Laibow-Koser wrote: > Run it through html2haml and see what you get. Note, however, that it > will usually produce > > %span > = content > > where you generally want > > %span= content > > Other than that, it's great to help you get started. PERFECT! Thanks Marnen! -- Posted via ht

[Rails] Help on formatting some HAML

2010-09-07 Thread Matt Royer
I wondered if anyone could help me with turning the following in ERB into HAML. I'm VERY new with HAML: <%= link_to "New Order", new_order_path, :remote => true %> Today's Activity <% @orders.each do |order| %> <%= "#{leading_zeros order.id}" %> <%= link_t

[Rails] Re: Re: Re: link_to underlying urls/paths are showing in the actual view

2010-08-24 Thread Matt Royer
Colin Law wrote: > What I do not understand about this is why this was (apparently) > showing on screen when it was in print.css, which presumably is only > intended to be used for printing. That was odd to me too. I guess I was just excited that my issue was solved, because I didn't even think t

[Rails] Re: Re: link_to underlying urls/paths are showing in the actual view

2010-08-23 Thread Matt Royer
sited:after {content:" (" attr(href) ")";font-size:90%;} Take out the following code: content:" (" attr(href) ")"; That will do it for you. Thanks again everyone! --Matt Royer -- Posted via http://www.ruby-forum.com/. -- You rece

[Rails] Re: Re: link_to underlying urls/paths are showing in the actual view

2010-07-01 Thread Matt Royer
Thanks for the tips Colin and Anand... Neither corrected the issue. I'm going to see if I can do this from another system. I'm wondering if my installation is jacked up or something. I'll post again and let everyone know what i've found. I'm on my system at work, so am limited by what I can do.

[Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-29 Thread Matt Royer
reciated. Thanks in advance, --Matt Royer -- 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 post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe

[Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-24 Thread Matt Royer
> I'm getting the same thing. I'm on Rails 3.0.0.beta4. > > Have you found a solution to this? One more thing. I only get this when I use Firefox (I haven't tried Opera or Chrome though). In Interet Explorer, this works how it should with only showing the names and not the the paths in parenthe

[Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-24 Thread Matt Royer
Adler Santos wrote: > for example I have the following simple code in my views: > > <%= link_to "Here", :controller => 'home', :action => 'inside_here' %> > > I get the "actual" view in the page looking like this: > > Here (/home/inside_here) > > where the underlying url is showing right beside

[Rails] Re: Rails 3 link_to :remote

2010-06-16 Thread Matt Royer
Update for anyone that needs help in this area. I found my problem. You might have to do the same (if you are using this function the way I am). In my controller, I don't know why I put this in the Index action before. It is now in the SHOW (duh) action: format.js { render(:update) {|pag

[Rails] Re: Rails 3 link_to :remote

2010-06-15 Thread Matt Royer
Matt Royer wrote: > I wasn't sure if this was the right way to accomplish this: > > > > format.js { > render :update do |page| > page.replace_html 'order_div', :partial => 'show_order' > end > } > > Sorry, forgot to

[Rails] Re: Rails 3 link_to :remote

2010-06-15 Thread Matt Royer
I wasn't sure if this was the right way to accomplish this: format.js { render :update do |page| page.replace_html 'order_div', :partial => 'show_order' end } Apperently not, as it doesn't work. But can someone at least tell me if I am on the right track? I've checked everywh

[Rails] Rails 3 link_to :remote

2010-06-14 Thread Matt Royer
e to the /orders/show/etc... I want it to display the info that show normally would in the same page. I have a list of orders to click on. Want this to happen without a full page refresh. Can anyone help me with the new way Rails handles this sort of thing? Thanks, --Matt Royer -- Posted via ht

[Rails] Re: Re: Only display 5 items at a time with more button

2010-06-01 Thread Matt Royer
lly care how I got there (thought JS would be the quickest, that's why I posted this), so thank you very much for the solution! -- Matt Royer -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on R

[Rails] Re: Only display 5 items at a time with more button

2010-06-01 Thread Matt Royer
Matt Royer wrote: > > > > > > > <% @orders.reverse.each do |order| %> > > <%= link_to_remote( "#{order.id} #{order.name}" , :url => > {:controller => 'orders', :action => 'show',

[Rails] Only display 5 items at a time with more button

2010-06-01 Thread Matt Royer
I have the following code: <% @orders.reverse.each do |order| %> <%= link_to_remote( "#{order.id} #{order.name}" , :url => {:controller => 'orders', :action => 'show', :id => order.id }, :update => "order_div", :method => 'get' ) %> <% end %> I want to create a button or lin

[Rails] Re: Re: Leading Zeros in a Method

2010-06-01 Thread Matt Royer
an, this stuff is daunting, but cool to work with. Thanks again Colin. --Matt Royer -- 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 post to this group, send email to rubyonrails-t

[Rails] Re: Re: Leading Zeros in a Method

2010-06-01 Thread Matt Royer
Colin Law wrote: > Are you sure line 9 of that file is the one you have shown above? > Have you remembered to save the file? I forgot to take my previous solution out of the view. :) Dumb mistake, I know. Thanks Colin for you help! --Matt Royer -- Posted via http://www.ruby-for

[Rails] Re: Leading Zeros in a Method

2010-06-01 Thread Matt Royer
Matt Royer wrote: > Thanks Peter! > > I put the method in the application_helper.rb file: > > > def leading_zeros(number) > "%05d" % number > end > > > And then put the following like you said: > > > #{leading_ze

[Rails] Re: Leading Zeros in a Method

2010-06-01 Thread Matt Royer
Colin Law wrote: > Rather than attempt to add a method to the String class, which is what > you seem to be suggesting, You could add a method to your model that > returns the id and name as a formatted string. So in order.rb > something like > def order_code > "#{'%05d' % id} #{name}" > end > Th

[Rails] Re: Leading Zeros in a Method

2010-06-01 Thread Matt Royer
Peter Hickman wrote: > you could create a method called > > def leading_zeros(number) > "%05d" % number > end > > and then call it > > "#{leading_zeros order.id}#{order.name}" > Thanks Peter! I put the method in the application_helper.rb file: def leading_zeros(number) "%05d

[Rails] Leading Zeros in a Method

2010-06-01 Thread Matt Royer
I found the following topic in the forum: http://www.ruby-forum.com/topic/82137 Ian J Cottee had an easy way of adding leading zeros to a number: "%05d" % an_int I'm still new to ruby, so I wanted to know. How would I put this into a method that I can attach to whatever string I want

[Rails] Re: Display only by date selected

2010-05-29 Thread Matt Royer
Ar Chron wrote: > Seems like pretty elementary logic... > For populating the droplist on the form, you just need a set of items > with a defined coding scheme (0 = today, 1 = 1 week, 2 = 2 weeks, 3 = 1 > month, 4 = 1 year, 5 = all, or some such). > > In the controller interpreting the link_to_re

[Rails] Re: problems with render in store.html.erb

2010-05-28 Thread Matt Royer
to the javascript tag at the top of the layout. I added :default instead of just that library though because I was messing with some other functions. Anyway, that's about all I can think of for right now. Hopefully it will help to go back through the check list of little things to che

[Rails] Display only by date selected

2010-05-28 Thread Matt Royer
I have the following code: Today's Activity <% @orders.reverse.each do |order| %> <%= link_to_remote( "#{order.id}       #{order.name}" , :url => {:controller => 'orders', :action => 'show', :id => order.id }, :update => "order_div", :method => 'get' ) %> <% end %> This

[Rails] Re: Re: Re: Rendering a partial on a two column page

2010-05-21 Thread Matt Royer
Thanks Rob!!! It worked PERFECTLY. Thanks again for you help! -- 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 post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscrib

[Rails] Re: Re: Rendering a partial on a two column page

2010-05-20 Thread Matt Royer
Rob Biedenharn wrote: Hi Rob, Thanks for the quick response! I'm sorry, I'm still relatively new at this Rails stuff. I have gone through a couple of books, but it's hard to tie it all together. :) When you put the following: >:id => order.id Where should I enter that? Within the link_to

[Rails] Re: Rendering a partial on a two column page

2010-05-20 Thread Matt Royer
Okay, I made a really dumb mistake and put: <% javascript_include_tag 'defaults' %> Instead of: <% javascript_include_tag :defaults %> So that fixed my rendering. At least I'm getting information over to the other column now. But it's an error, because it can't find the ID. I attached the scr

[Rails] Rendering a partial on a two column page

2010-05-20 Thread Matt Royer
Hi, I attached a page for clarity of what I want. I have a two column page (index.html.erb). On the left hand side, I have the order ID and order NAME displayed. There is a SHOW link next to each entry. I want to be able to click on the SHOW link and have it display the full order information on