[Rails] Re: CMS action & "/cms" subfolder for each controller

2009-07-06 Thread wejrow...@gmail.com
Anyone have any idea? I've tried things like, map.connect '/articles/cms', :controller => 'articles', :action => 'cms' But I get, "Couldn't find Article with ID=cms" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[Rails] CMS action & "/cms" subfolder for each controller

2009-07-04 Thread wejrow...@gmail.com
How do I do this? (And is this a good solution?) I want to have a "/cms" for each controller so I can login as admin and edit them, instead of creating whole new controllers for the cms. Default if you add a new action like, def cms... you have to do / controller/1/cms. I'm thinking of creating

[Rails] Re: The main index.html

2009-06-10 Thread wejrow...@gmail.com
Got it! Either of these work: map.connect "", :controller => 'mycontroller', :action => "index" map.root :controller => "mycontroller" I just had to delete the index.html in the public directory. --~--~-~--~~~---~--~~ You received this message because you a

[Rails] Re: The main index.html

2009-06-10 Thread wejrow...@gmail.com
Anyone know off hand what that would be to connect a controller and view to the main index.html? been looking around, seems this should do it? map.connect "/", :controller => 'the5one', :action => "index" Tried a few combinations of that.. can't get it going.. I'll fiddle around a bit more.. -

[Rails] The main index.html

2009-06-10 Thread wejrow...@gmail.com
So if I want to grab info from various Models and put it on the main Index page how does that work? Since there's no main index view or controller?.. or is there?.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] scaffold.. random error

2009-06-09 Thread wejrow...@gmail.com
Did this: script/generate scaffold file name:string description:text file_url:string online_status:boolean position:integer Plus: rake db:migrate And the model gives me an error. It can't call any functions like, Text.all, Text.new etc. I get: "undefined method `all' for Text:Module" I've do

[Rails] authenticity_token and Flash - plus sign not recognizing

2009-05-20 Thread wejrow...@gmail.com
OK I need to send the auth token to Flash. I can get it, but for some reason the + signs in the auth code are showing up as spaces. Anyone know why? or how to get around this? Also, if I send the authenticity_token back to rails, to I have to set it using auth_token= params[...] or anything? Not

[Rails] Re: Installing rmagick - failed

2009-05-19 Thread wejrow...@gmail.com
I'm not sure.. I have no idea. Hhow would I check? I've tried looking up for a while but can't find anything. Hivelogic has a good tutorial, but none of the zip files are working. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[Rails] Re: Sending vars from Flash to Rails - how to use auth_token

2009-05-19 Thread wejrow...@gmail.com
Hmm, I tried doing: request.data = "authenticity_token="+paramList["authenticityToken"] +"&design_id=1"; instead of variables, and still nothing. One thing I did notice... I made a dynamic field on the stage and put the auth_code in there to see if it was working. I'm not sure why, but for some

[Rails] Sending vars from Flash to Rails - how to use auth_token

2009-05-19 Thread wejrow...@gmail.com
OK I finally am able to get a filereference uploader to send files to rails from Flash. I had to turn the auth_token off using: skip_before_filter :verify_authenticity_token, :only => 'upload_photo' But, for security I want to turn it back on. But I'm unable to get Flash to send the vars correc

[Rails] Installing rmagick - failed

2009-05-18 Thread wejrow...@gmail.com
Downloaded the latest rmagic, typed in sudo gem install rmagick, and got some failures: checking for Magick-config... no ... Can't install RMagick 2.9.2. Can't find Magick-config in /usr/local/ bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/ sbin:/usr/local/bin:/usr/X11/bin A

[Rails] datetime to_s(:option) not working

2009-05-14 Thread wejrow...@gmail.com
I added a migration to add a datetime object column to my database. It all works great, and I can edit it and everything using the select_date helper for forms. BUT when I try to format the date using gallery.gallery_date.to_s (:short) I get an error: "wrong number of arguments (1 for 0)" How d

[Rails] Re: Multiple file upload w/Rails 2.x

2009-05-14 Thread wejrow...@gmail.com
I can mess with it again... but if I use Flash, is there anything out of the ordinary I need to do (eg with the authentication in Rails 2.x)? I used the same Flash script that worked to send to PHP to Ruby and I couldn't get Ruby to do anything with the files (using Rails script that worked with s

[Rails] Re: Multiple file upload w/Rails 2.x

2009-05-14 Thread wejrow...@gmail.com
I actually have my own uploader class for Flash, which uploads multiple files one after the other. The only thing I need to know is how to get Rails to retrieve that file. Any simple solutions/tutorials? --~--~-~--~~~---~--~~ You received this message because you ar

[Rails] Re: Multiple file upload w/Rails 2.x

2009-05-14 Thread wejrow...@gmail.com
That looks like a start. But what about integrating it with Rails? That's my problem, I can't get Flash to talk to rails. I don't see any documentation for it on their site. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

[Rails] Multiple file upload w/Rails 2.x

2009-05-14 Thread wejrow...@gmail.com
Been searching forever. I need to create a multiple file uploader. I can do single files, but I want to do multiple. I think flash is my only option. But my problem is I can't get flash to communicate. May be something with the auth code, I've tried passing the auth code to Flash and back to Rails

[Rails] Resource for creating a Text Editor (kinda like gmail or wordpress)

2009-05-12 Thread wejrow...@gmail.com
I'm looking to create a textarea that you can edit (bold, create links, view html etc.), much like Wordpress or gmail. Anyone know a good resource to learn how to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

[Rails] Re: forms & link css classes - not working

2009-05-12 Thread wejrow...@gmail.com
hah! How did I not see that! Thanks! --~--~-~--~~~---~--~~ 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-talk@googlegroups.com To unsubscribe from this group,

[Rails] forms & link css classes - not working

2009-05-12 Thread wejrow...@gmail.com
I used a scaffold to create an interface. I'm trying to style it and I'm having trouble. In my css I have: #content a, a:link, a:visited{ color: #ff8400; } #content a:hover{ background: #ff8400; color: #FF; } #content a.urgent, a.urgent:link, a.urgent:visited {

[Rails] Re: CMS and REST - best practices

2009-05-11 Thread wejrow...@gmail.com
No, I want to build it myself.. I look at it though. So what is the best practice? Should I build a separate section with its own controllers to edit them? or make a separate private view within the component controller? --~--~-~--~~~---~--~~ You received this mes

[Rails] CMS and REST - best practices

2009-05-11 Thread wejrow...@gmail.com
OK I need a bit of direction for this. I want to build an app where I have a CMS side that edits everything (which is all private), then a public side which just views is all. My dilemma is how to set this up. What is the best practice for this? I have a couple ideas: obj1Controller/Obj1 (this w

[Rails] Re: Flash Filereference and Rails - getting http 422

2009-05-09 Thread wejrow...@gmail.com
I didn't, but I'm running on a Mac, so I figured it wouldn't matter.. Plus that post is 3 years old! --~--~-~--~~~---~--~~ 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 ru

[Rails] Re: Flash Filereference and Rails - getting http 422

2009-05-08 Thread wejrow...@gmail.com
oops, I meant still NOT working** Any ideas? --~--~-~--~~~---~--~~ 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-talk@googlegroups.com To unsubscribe from thi

[Rails] Re: Flash Filereference and Rails - getting http 422

2009-05-08 Thread wejrow...@gmail.com
K I figured out how to fetch and send the AuthToken.. It's still now working. Anyone have any idea, or a resource for Flash file uploading to Rails 2.x? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: Flash Filereference and Rails - getting http 422

2009-05-08 Thread wejrow...@gmail.com
Hmm. I think it may be something with the Authenticity Token. I think I need to bypass it... --~--~-~--~~~---~--~~ 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 rubyonrail

[Rails] Re: Flash Filereference and Rails - getting http 422

2009-05-08 Thread wejrow...@gmail.com
Anyone know what the answer might be? Or an up to date link that explains? --~--~-~--~~~---~--~~ 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-talk@googlegroup

[Rails] Flash Filereference and Rails - getting http 422

2009-05-06 Thread wejrow...@gmail.com
I've spent the last few days trying to figure this out. I have my own Filereference class I use with PHP. But I'm trying to use it with Rails and can't seem to get it to work. I even downloaded some samples online and can't get those to work (http://blog.vixiom.com/2006/09/08/ multiple-file-upload

[Rails] Re: controller/ URL not working without controller/index

2009-04-30 Thread wejrow...@gmail.com
I think I figured it out. I needed to have: map.resources :portfolios NOT: map.resource :portfolios (plural, not singular resources) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To p

[Rails] controller/ URL not working without controller/index

2009-04-30 Thread wejrow...@gmail.com
I'm following a book. It tells me to use: map.resource :controllername in routes But, once I do that, for some reason my main controller/index doesn't work if I don't have "/index" behind it. Anyone know why that would be? It just gives me: Unknown action No action responded to show. Actions:

[Rails] Re: Driving me nuts!!! - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

2009-04-29 Thread wejrow...@gmail.com
Wow, ok this solved it: Instead of using: sudo ./bin/mysqld_safe --user=mysql I needed to use: sudo ./bin/mysql_install_db --user=mysql --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. T

[Rails] Driving me nuts!!! - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

2009-04-28 Thread wejrow...@gmail.com
I had to put a new HD in, and now I'm reinstalling everything, and can't get mysql to fully work. I can't remember how I fixed it. I've searched everywhere online and can't find anything. when I try to use the >mysql command I get this: Can't connect to local MySQL server through socket '/tmp/ m

[Rails] Re: Controllers and form_for

2009-04-23 Thread wejrow...@gmail.com
OK, I have this in my routes: map.resources :youtube_editor map.resources :youtubes I deleted youtubes and I got an error. (I think "youtube" is my model name, but "youtubes" may be my table name. "youtube_editor" is my controller. How do I get the resource youtube_editor linked to the @vide

[Rails] Controllers and form_for

2009-04-23 Thread wejrow...@gmail.com
I'm a bit confused on how this works. My form is sending to a weird location. Here's my situation: I have a model: youtube.rb I have a controller called: youtube_editor_controller.rb In my youtube_editor view, i have new.html.erb, where I'm trying to make a form for the var I created in my youtu

[Rails] Re: Ruby and Terminal - why didn't anyone explain this?

2009-04-22 Thread wejrow...@gmail.com
Hmm... I just typed in, "script/server RAILS_ENG=development" and it fixed my problems. Why would that be? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send emai

[Rails] Re: Ruby and Terminal - why didn't anyone explain this?

2009-04-22 Thread wejrow...@gmail.com
Thanks a lot guys!... I'm SLOWLY getting familiar with the shell. Maybe I should start another topic for this.. but: My ruby isn't working anymore! In the last few hours I deleted some random ruby files on my main user folder (mac OSX) because I think I accidentally installed a rails app there a

[Rails] Ruby and Terminal - why didn't anyone explain this?

2009-04-21 Thread wejrow...@gmail.com
I'm learning RoR. I've been using PHP for 6 years now. I bought the new Agile Web Dev With Rails book and it took me about 9 hours to get the first project going. No where did it, or anywhere else explain the whole terminal inputs. It just said to open your "shell".. What is the deal with those,